home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / OEMNSVRA.IN_ / oemnsvra.inf
INI File  |  1996-07-12  |  284KB  |  6,288 lines

  1. [Identification]
  2.     OptionType = NetService
  3. [Options]
  4.     RAS
  5. [GeneralConstants]
  6.     Chosen       = "ON"
  7.     NotChosen    = "OFF"
  8.     TRUE         = 1
  9.     FALSE        = 0
  10.     NoTitle      = 0
  11.     FLibraryErrCtl = 1
  12.     OldVersionExisted = $(FALSE)
  13. [FileConstants]
  14.     HandleNull   = ""
  15.     PORTSDLGHANDLE = $(HandleNull)
  16.     RasServerOption = "Server"
  17.     RasClientOption = "Client"
  18.     RasAdminOption  = "Admin"
  19.     RasClientAndServerOption = "ClientAndServer"
  20.     !Manufacturer        = "Microsoft"
  21.     !ProductMajorVersion = "4"
  22.     !ProductMinorVersion = "0"
  23.     ProductVersion       = $(!ProductMajorVersion)"."$(!ProductMinorVersion)
  24.     ProductOpSupport     = 134 
  25.     NetEventDLL = "%SystemRoot%\System32\netevent.dll"
  26.     IoLogMsgDll = "%SystemRoot%\System32\drivers\IoLogMsg.dll"
  27.     !RasMsgDll   = "%SystemRoot%\System32\rasmsg.dll"
  28.     !RasEventTypeSupported = 31
  29.     !HideComponent = 1
  30.     HideBindings  = 0
  31.     fReviewBindings = 1
  32.     !RasInfName     = "OEMNSVRA.INF"
  33.     ProductFullInfName = $(!STF_CWDDIR)$(!RasInfName)
  34.     RasDir      = $(!STF_CWDDIR)RAS
  35.     ProductPath = $(RasDir)"\"
  36.     ProductRASName        = "RAS"
  37.     ProductRASImagePath   = "%SystemRoot%\system32\ras"
  38.     ProductRASSvcType     = "service"
  39.     NetRuleRASClass       = "classRasService ""basic"""
  40.     NetRuleRASType        = "RasService classRasService"
  41.     NetRuleRASUse         = "system"
  42.     !ProductPCIMACName     = "PCIMAC"
  43.     ProductRASSVRName       = "RemoteAccess"
  44.     ProductRASSVRImagePath  = "%SystemRoot%\system32\rassrv.exe"
  45.     ProductRASSVRSvcType    = "service"
  46.     NetRuleRASSVRClass      = "classRasServer ""basic"""
  47.     NetRuleRASSVRType       = "RasServer classRasServer"
  48.     NetRuleRASSVRUse        = $(ProductRASSVRSvcType)
  49.     NetRuleRASSVRBindForm   = """RasServer"" yes yes container"
  50.     NetRuleRASSVRBindable    = {"classRasServer netBiosTransport non non 100",+
  51.                                 "classRasServer ipxTransport non non 100"}
  52.     ProductRASMANName       = "RasMan"
  53.     ProductRASMANImagePath  = "%SystemRoot%\system32\rasman.exe"
  54.     ProductRASMANSvcType    = "service"
  55.     NetRuleRASMANClass      = "classRasManager ""basic"""
  56.     NetRuleRASMANType       = "RasManager classRasManager"
  57.     NetRuleRASMANUse        = $(ProductRASMANSvcType)
  58.     NetRuleRASMANBindForm   = """RasManager"" yes no container"
  59.     NetRuleRASMANBindable   = ""
  60.     !ProductRASARPName       = "RasArp"
  61.     !ProductRASARPImagePath  = "\SystemRoot\system32\drivers\rasarp.sys"
  62.     !ProductRASISNRIPName       = "NwlnkRip"
  63.     !ProductRASISNSAPName       = "NwSapAgent"
  64.     !ProductRASISNRIPImagePath  = "\SystemRoot\system32\drivers\nwlnkrip.sys"
  65.     !ProductRASISNSAPImagePath  = "%SystemRoot%\system32\services.exe"
  66.     !ProductRASAUTODIALName       = "RasAuto"
  67.     !ProductRASAUTODIALImagePath  = "%SystemRoot%\system32\rasman.exe"
  68.     !ProductRASAUTODIALSvcType    = "service"
  69.     !ProductRASACDName       = "RasAcd"
  70.     !ProductRASACDImagePath  = "\SystemRoot\system32\drivers\rasacd.sys"
  71.     !ProductNDISWANName        = "NdisWan"
  72.     !ProductNDISWANImagePath = "\SystemRoot\system32\drivers\ndiswan.sys"
  73.     ProductNDISWANSvcType   = "kernel"
  74.     ProductNDISWANType        = "transport"
  75.     !NetRuleNDISWANType        = "ndisWanDrv ndisWanTransport"
  76.     !NetRuleNDISWANClass     = {"ndisWanTransport basic"}
  77.     NetRuleNDISWANUse        = $(ProductNDISWANType)" yes yes"
  78.     !NetRuleNDISWANBindForm  = """NdisWan"" yes no container"
  79.     !NetRuleNDISWANBindable  = +
  80.           {"rasCapableTransport ndisWanAdapterDialIn non non 100",+
  81.            "rasCapableTransport ndisWanAdapterDialOut non non 100",+
  82.            "tcpipTransport ndisWanAdapterDialInIP non non 100",+
  83.            "tcpipTransport ndisWanAdapterDialOutIP non non 100",+
  84.            "netbtTransport ndisWanAdapterDialInIP non non 100",+
  85.            "netbtTransport ndisWanAdapterDialOutIP non non 100",+
  86.            "ipxTransport ndisWanAdapterDialInOutIPX non non 100",+
  87.            "bhService    ndisWanAdapterBH non non 100",+
  88.            "ndisWanTransport ndisWanAdapterBH non non 100",+
  89.            "ndisWanTransport ndisWanAdapterDialIn non non 100",+
  90.            "ndisWanTransport ndisWanAdapterDialOut non non 100",+
  91.            "ndisWanTransport ndisWanAdapterDialInIP non non 100",+
  92.            "ndisWanTransport ndisWanAdapterDialOutIP non non 100",+
  93.            "ndisWanTransport ndisWanAdapterDialInOutIPX non non 100"}
  94.     ProductRASASYMACName      = "AsyncMac"
  95.     ProductRASASYMACImagePath = "\SystemRoot\system32\drivers\asyncmac.sys"
  96.     ProductRASASYMACType      = "driver"
  97.     ProductRASASYMACSvcType   = "kernel"
  98.     NetRuleRASASYMACType      = "rasAsyMacDrv rasAsyMacDriver"
  99.     NetRuleRASASYMACClass      = {"rasAsyMacDriver basic"}
  100.     NetRuleRASASYMACUse      = $(ProductRASASYMACType)
  101.     NetRuleRASASYMACBindForm  = """RasAsyMac"" yes no container"
  102.     !NetRuleRASASYMACBindable  = +
  103.                        {"rasAsyMacDriver rasAsyMacAdapter non non 100"}
  104.     !ProductRASHUBDIALINName        = "RasHubDialin"
  105.     !ProductRASHUBDIALOUTName        = "RasHubDialout"
  106.     !ProductRASHUBDIALINIPName      = "RasHubDialinIp"
  107.     !ProductRASHUBDIALOUTIPName     = "RasHubDialoutIp"
  108.     !ProductRASHUBDIALINOUTIPXName  = "RasHubDialinoutIpx"
  109.     !ProductNDISWANDIALINName          = "NdisWanDialin"
  110.     !ProductNDISWANDIALOUTName          = "NdisWanDialout"
  111.     !ProductNDISWANDIALINIPName       = "NdisWanDialinIp"
  112.     !ProductNDISWANDIALOUTIPName      = "NdisWanDialoutIp"
  113.     !ProductNDISWANDIALINOUTIPXName   = "NdisWanDialinoutIpx"
  114.     !NetRuleHardwareBHType      = "ndisWanBH ndisWanAdapterBH"
  115.     !NetRuleHardwareBHClass     = {"ndisWanAdapterBH basic"}
  116.     !NetRuleHardwareBHBindForm  = " yes yes container"
  117.     !NetRuleHardwareNDISWANBindForm = " yes yes container"
  118.     !NetRuleHardwareDIALINType      = "ndiswandialin ndisWanAdapterDialIn"
  119.     !NetRuleHardwareDIALINClass      = {"ndisWanAdapterDialIn basic"}
  120.     !NetRuleHardwareDIALINBlock    = {"lanmanServer ndisWanAdapterDialIn",+
  121.                      "tcpipTransport ndisWanAdapterDialIn",+
  122.                      "netbtTransport ndisWanAdapterDialIn",+
  123.                      "ipxTransport ndisWanAdapterDialin",+
  124.                      "lanmanWorkstation ndisWanAdapterDialIn"}
  125.     !NetRuleHardwareDIALINIPType     = "ndiswandialinIP ndisWanAdapterDialInIP"
  126.     !NetRuleHardwareDIALINIPClass    = {"ndisWanAdapterDialInIP basic"}
  127.     !NetRuleHardwareDIALINIPBlock    = {"lanmanServer ndisWanAdapterDialInIP",+
  128.                       "nbfTransport ndisWanAdapterDialinIP",+
  129.                       "ipxTransport ndisWanAdapterDialinIP",+
  130.                       "lanmanWorkstation ndisWanAdapterDialInIP"}
  131.     !NetRuleHardwareDIALOUTType       = "ndiswandialout ndisWanAdapterDialOut"
  132.     !NetRuleHardwareDIALOUTClass    = {"ndisWanAdapterDialOut basic"}
  133.     !NetRuleHardwareDIALOUTBlock    = {"ipxTransport ndisWanAdapterDialOut"}
  134.     !NetRuleHardwareDIALOUTIPType     = "ndiswandialoutIP ndisWanAdapterDialOutIP"
  135.     !NetRuleHardwareDIALOUTIPClass    = {"ndisWanAdapterDialOutIP basic"}
  136.     !NetRuleHardwareDIALOUTIPBlock    = {"ipxTransport ndisWanAdapterDialOutIP",+
  137.                     "nbfTransport ndisWanAdapterDialOutIP"}
  138.     !NetRuleHardwareDIALINOUTIPXType = "ndiswandialinoutIPX ndisWanAdapterDialInOutIPX"
  139.     !NetRuleHardwareDIALINOUTIPXClass = {"ndisWanAdapterDialInOutIPX basic"}
  140.     !NetRuleHardwareDIALINOUTIPXBlock = {"nbfTransport ndisWanAdapterDialInOutIPX",+
  141.                     "tcpipTransport ndisWanAdapterDialInOutIPX",+
  142.                     "netbtTransport ndisWanAdapterDialInOutIPX"}
  143.     NetRuleHardwareRASASYMACType     = "rasAsyMac rasAsyMacAdapter"
  144.     NetRuleHardwareRASASYMACBindForm = " yes yes container"
  145.     NetRuleHardwareRASASYMACClass     = {"rasAsyMacAdapter basic"}
  146.     !ProductNDISTAPIName        = "NdisTapi"
  147.     !ProductNDISTAPIImagePath   = "\SystemRoot\system32\drivers\ndistapi.sys"
  148.     !RasPerfKeyName             = "Performance"
  149.     !RasPerfLibraryName         = "rasctrs.dll"
  150.     !RasPerfOpenFunction        = "OpenRasPerformanceData"
  151.     !RasPerfCloseFunction       = "CloseRasPerformanceData"
  152.     !RasPerfCollectFunction     = "CollectRasPerformanceData"
  153.     !RasCounterFileName         = "rasctrs.ini"
  154.     ProductKeyBase  = $(!NTN_SoftwareBase)"\"$(!Manufacturer)
  155.     ProductKeyName           = $(!NTN_SoftwareBase)"\"$(!Manufacturer)"\"$(ProductRASName)"\CurrentVersion"
  156.     !NetworkCardKeyName      = $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards"
  157.     RasSvrKeyName            = $(!NTN_ServiceBase)"\"$(ProductRASSVRName)
  158.     RasSvrParamKeyName       = $(!NTN_ServiceBase)"\"$(ProductRASSVRName)"\Parameters"
  159.     !RasManSvcKeyName        = $(!NTN_ServiceBase)"\"$(ProductRASMANName)
  160.     !RasAcdKeyName           = $(!NTN_ServiceBase)"\"$(!ProductRASACDName)
  161.     !RasArpKeyName           = $(!NTN_ServiceBase)"\"$(!ProductRASARPName)
  162.     !RasIsnRipKeyName        = $(!NTN_ServiceBase)"\"$(!ProductRASISNRIPName)
  163.     !RasIsnSapKeyName        = $(!NTN_ServiceBase)"\"$(!ProductRASISNSAPName)
  164.     !NdisTapiKeyName         = $(!NTN_ServiceBase)"\"$(!ProductNDISTAPIName)
  165.     !RasManKeyName           = $(!NTN_SoftwareBase)"\"$(!Manufacturer)"\"$(ProductRASMANName)"\CurrentVersion"
  166.     !RasAutodialKeyName       = $(!NTN_ServiceBase)"\"$(!ProductRASAUTODIALName)
  167.     RasManParamKeyName       = $(!NTN_ServiceBase)"\"$(ProductRASMANName)"\Parameters"
  168.     RasManLinkageKeyName     = $(!NTN_ServiceBase)"\"$(ProductRASMANName)"\Linkage"
  169.     NdisWanParamKeyName      = $(!NTN_ServiceBase)"\"$(!ProductNDISWANName)"\Parameters"
  170.     NdisWanLinkageKeyName    = $(!NTN_ServiceBase)"\"$(!ProductNDISWANName)"\Linkage"
  171.     RasAsyMacKeyName         = $(!NTN_ServiceBase)"\"$(ProductRASASYMACName)
  172.     RasAsyMacParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductRASASYMACName)"\Parameters"
  173.     RasMacLinkageKeyName     = $(!NTN_ServiceBase)"\"$(ProductRASASYMACName)"\Linkage"
  174.     RasTapiDevicesKeyName    = $(!NTN_SoftwareBase)"\"$(!Manufacturer)"\"$(ProductRASName)"\TAPI DEVICES"
  175.     LinkageKeyName           = $(!NTN_ServiceBase)"\"$(Product$(Option)Name)"\Linkage"
  176.     !ProductNDISWANKeyName   = $(!NTN_SoftwareBase)"\"$(!Manufacturer)"\"$(!ProductNDISWANName)"\CurrentVersion"
  177.     ProductRASASYMACKeyName  = $(!NTN_SoftwareBase)"\"$(!Manufacturer)"\"$(ProductRASASYMACName)"\CurrentVersion"
  178.     RasProtocolsKeyName      = $(!NTN_SoftwareBase)"\"$(!Manufacturer)"\"$(ProductRASName)"\PROTOCOLS"
  179.     !UtilityInf     = "UTILITY.INF"
  180.     subroutninf    = "SUBROUTN.INF"
  181.     RascfgDll      = "RASCFG.DLL"
  182.     Exit_Code      = 0
  183.     ShellCode      = 0
  184.     from      = ""
  185.     to        = ""
  186.     ExitCodeOk     = 0
  187.     ExitCodeCancel = 1
  188.     ExitCodeFatal  = 2
  189.     KeyNull         = ""
  190.     !MAXIMUM_ALLOWED   = 33554432
  191.     !SERVICE_NO_CHANGE = 4294967295
  192.     RegistryErrorIndex = NO_ERROR
  193.     ServerSize  = 820116
  194.     ClientSize  = 634260
  195.     AdminSize   = 513962
  196.     FInstallServer = $(Chosen)
  197.     FInstallClient = $(Chosen)
  198.     FInstallAdmin  = $(Chosen)
  199. [UiVars]
  200.     VolumeList      = {} ? $(!LIBHANDLE) GetHardDriveLetters
  201.     VolumeFreeList  = {} ? $(!LIBHANDLE) GetHardDriveFreeSpace
  202.     VolumeFSList    = {} ? $(!LIBHANDLE) GetHardDriveFileSystems
  203.     DestVolume      = ""
  204.     MinHelpID   = 25000
  205.     MaxHelpID   = 25999
  206. [SystemVars]
  207.     !STF_PROCESSOR      = "" ? $(!LIBHANDLE) GetProcessor
  208.     !STF_PLATFORM       = "" ? $(!LIBHANDLE) GetPlatform
  209.     !STF_WINDOWSPATH    = "" ? $(!LIBHANDLE) GetWindowsNtDir
  210.     !STF_NTPATH         = $(!STF_WINDOWSPATH)
  211.     !STF_WINDOWSSYSPATH = "" ? $(!LIBHANDLE) GetWindowsNtSysDir
  212.     !STF_COMPUTERNAME   = "" ? $(!LIBHANDLE) GetMyComputerName
  213.     !STF_USERNAME       = "" ? $(!LIBHANDLE) GetMyUserName
  214.     !STF_FLOPPYLIST     = {} ? $(!LIBHANDLE) GetFloppyDriveLetters
  215.     !STF_UNUSEDDRIVES   = {} ? $(!LIBHANDLE) GetUnusedDrives
  216.     !STF_LANGUAGE       = "" ? $(!LIBHANDLE) GetLanguage
  217.     !STF_BUSTYPE        = "" ? $(!LIBHANDLE) GetMyBusType
  218.     !STF_BUSTYPELIST    = "" ? $(!LIBHANDLE) GetMyBusTypeList
  219.     !NTN_SoftwareBase   = "Software"
  220.     !NTN_ServiceBase    = "System\CurrentControlSet\Services"
  221.     !NTN_ScUseRegistry  = "NO"
  222. [AvailableSystemMemory]
  223.     SystemMemory    = "" ? $(!LIBHANDLE) GetMemorySize
  224.     MinSystemMemory = 2048
  225. [date]
  226.     !CurrentDate = {} ? $(!LIBHANDLE) GetSystemDate
  227. [HelpContextIDs]
  228.     HC_RASOPTIONS     = 25020
  229.     HC_CLIENTACCESS   = 25021
  230.     HC_INSTALLOVER1   = 25022
  231.     HC_INSTALLOVER2   = 25023
  232. [Identify]
  233.     read-syms Identification
  234.     set Status     = STATUS_SUCCESSFUL
  235.     set Identifier = $(OptionType)
  236.     set Media      = #("Source Media Descriptions", 1, 1)
  237.     Return $(Status) $(Identifier) $(Media)
  238. [ReturnOptions]
  239.     set Status        = STATUS_FAILED
  240.     set OptionList     = {}
  241.     set OptionTextList = {}
  242.     set LanguageList = ^(LanguagesSupported, 1)
  243.     Ifcontains(i) $($0) in $(LanguageList)
  244.         goto returnoptions
  245.     Else
  246.         set Status = STATUS_NOLANGUAGE
  247.         goto finish_ReturnOptions
  248.     Endif
  249. returnoptions = +
  250.     set OptionList     = ^(Options, 1)
  251.     set OptionTextList = ^(OptionsText$($0), 1)
  252.     set Status         = STATUS_SUCCESSFUL
  253. finish_ReturnOptions = +
  254.     Return $(Status) $(OptionList) $(OptionTextList)
  255. [Shell Commands]
  256.     set Exit_Code = $(!STF_ERROR_GENERAL)
  257.     LoadLibrary "x" $(!STF_SRCDIR)\setupdll.dll !LIBHANDLE
  258.     LoadLibrary "x" $(!STF_SRCDIR)\ncpa.cpl !NCPA_HANDLE
  259.     ifstr(i) $(!LIBHANDLE) == ""
  260.        Debug-Output "OEMNSVRA.INF: unable to load setupdll.dll"
  261.        Shell subroutn.inf, SetupMessage $(!STF_LANGUAGE) "FATAL" $(UnableToLoadSetupdll)
  262.        set Exit_Code = STATUS_USERCANCEL
  263.        exit
  264.     endif
  265.     ifstr(i) $(!NCPA_HANDLE) == ""
  266.        Debug-Output "OEMNSVRA.INF: unable to load ncpa.cpl"
  267.        Shell subroutn.inf, SetupMessage $(!STF_LANGUAGE) "FATAL" $(UnableToLoadNcpaCpl)
  268.        set Exit_Code = STATUS_USERCANCEL
  269.        exit
  270.     endif
  271.     ifstr(i) $(RAS_INSTALL_MODE) == ""
  272.        set RAS_INSTALL_MODE = install
  273.     endif
  274.     read-syms SystemVars
  275.     detect    SystemVars
  276.     read-syms RasErrors$(!STF_LANGUAGE)
  277.     OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Control\ProductOptions" 33554432 KeyProductOption
  278.     ifstr(i) $(KeyProductOption) != ""
  279.         GetRegValue $(KeyProductOption) "ProductType" ProductTypeList
  280.         set TempProductType = *($(ProductTypeList),4)
  281.         ifstr(i) $(TempProductType) == "winnt"
  282.             set !STF_PRODUCT = WINNT
  283.         else-ifstr(i) $(TempProductType) == "lanmannt"
  284.             set !STF_PRODUCT = LANMANNT
  285.         else-ifstr(i) $(TempProductType) == "servernt"
  286.             set !STF_PRODUCT = SERVERNT
  287.         else
  288.             Debug-Output "OEMNSVRA.INF: invalid Product Type "$(TempProductType)
  289.             Shell subroutn.inf, SetupMessage $(!STF_LANGUAGE) "FATAL" $(UnknownProductType)
  290.             set Exit_Code = STATUS_USERCANCEL
  291.             exit
  292.         endif
  293.         CloseRegKey $(KeyProductOptions)
  294.     else
  295.         Debug-Output "OEMNSVRA.INF: unable to determine Product Type "
  296.         Shell subroutn.inf, SetupMessage $(!STF_LANGUAGE) "FATAL" $(NoProductType)
  297.         set Exit_Code = STATUS_USERCANCEL
  298.         exit
  299.     endif
  300.     Debug-Output "OEMNSVRA.INF: Product Type "$(!STF_PRODUCT)
  301.     ifstr(i) $(RAS_INSTALL_MODE) != "install"
  302.        ifstr(i) $(RAS_INSTALL_MODE) != "configure"
  303.           ifstr(i) $(RAS_INSTALL_MODE) != "deinstall"
  304.              Debug-Output "OEMNSVRA.INF: Invalid RAS_INSTALL_MODE "$(RAS_INSTALL_MODE)
  305.              Shell subroutn.inf, SetupMessage $(!STF_LANGUAGE) "WARNING" $(InvalidMode)
  306.              set Exit_Code = STATUS_USERCANCEL
  307.              exit
  308.           endif
  309.        endif
  310.     endif
  311.     set !NTN_InstallMode = $(RAS_INSTALL_MODE)
  312.     Shell "" InstallOption $(!STF_LANGUAGE) "RAS" $(!STF_SRCDIR) "YES" "YES" "YES"
  313.     ifint $($ShellCode) != $( !SHELL_CODE_OK)
  314.        Debug-Output "OEMNSVRA.INF: Failed to shell out to InstallOption"
  315.        exit
  316.     endif
  317.     set Exit_Code = $($R0)
  318.     ifstr(i) $($R0) == STATUS_SUCCESSFUL
  319.        set Exit_Code = 1
  320.     endif
  321.     Debug-Output "Oemnsvra.inf: install returned "$($R0)
  322.     FreeLibrary $(!LIBHANDLE)
  323.     FreeLibrary $(!NCPA_HANDLE)
  324.     exit
  325. [InstallOption]
  326.     Debug-Output "In InstallOption section"
  327.     set Status   = STATUS_FAILED
  328.     set Option      = $($1)
  329.     set SourceDir   = $($2)
  330.     set AddCopy     = $($3)
  331.     set DoCopy      = $($4)
  332.     set DoConfig    = $($5)
  333.     set LanguageList = ^(LanguagesSupported, 1)
  334.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  335.         Return STATUS_NOLANGUAGE
  336.     endif
  337.     StartWait
  338.     set-subst LF = "\n"
  339.     read-syms UiVars
  340.     detect    UiVars
  341.     set !STF_NTPATH = $(!STF_WINDOWSSYSPATH)
  342.     GetDriveInPath !STF_NTDRIVE $(!STF_WINDOWSSYSPATH)
  343.     read-syms GeneralConstants
  344.     read-syms FileConstants
  345.     read-syms DialogConstants$(!STF_LANGUAGE)
  346.     read-syms FileConstants$(!STF_LANGUAGE)
  347.     read-syms RasErrors$(!STF_LANGUAGE)
  348.     detect date
  349.     read-syms HelpContextIDs
  350.     SetHelpFile $(!STF_CWDDIR)rassetup.hlp $(MinHelpID) $(MaxHelpID)
  351.     set-title  $(FunctionTitle)
  352.     set to   = Begin
  353.     set from = Begin
  354.     set CommonStatus = STATUS_SUCCESSFUL
  355.     Debug-Output "OEMNSVRA.INF: STF_CWDDIR is: "$(!STF_CWDDIR)
  356.     Debug-Output "OEMNSVRA.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  357.     Debug-Output "OEMNSVRA.INF: Option is: "$(Option)
  358.     Debug-Output "OEMNSVRA.INF: NTN_SoftwareBase is: "$(!NTN_SoftwareBase)
  359.     Debug-Output "OEMNSVRA.INF: NTN_ServiceBase is: "$(!NTN_ServiceBase)
  360. Begin = +
  361.     set !NETCARD_LIST    = {}
  362.     set ServerInstalled = FALSE
  363.     set ClientInstalled = FALSE
  364.     set AdminInstalled  = FALSE
  365.     set DoServer     = TRUE
  366.     set DoClient     = TRUE
  367.     set DoAdmin      = TRUE
  368.     set DoServerOnly = FALSE
  369.     set DoClientOnly = FALSE
  370.     set DoAdminOnly  = FALSE
  371.     set DoRas        = FALSE
  372.     set DoRasSvr     = FALSE
  373.     set DoRasMan     = FALSE
  374.     set DoNdisWan     = FALSE
  375.     set DoRasAsyMac  = FALSE
  376.     IfStr(i) $(!NTN_InstallMode)    ==    deinstall
  377.         Set StartLabel = RemoveRas
  378.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  379.         set StartLabel = UpgradeRas
  380.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  381.         set StartLabel = ConfigureRas
  382.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  383.         set StartLabel = BindingsRas
  384.     else
  385.         set StartLabel = InstallRas
  386.     endif
  387.     set from = Begin
  388.     set to = end
  389.     goto $(StartLabel)
  390. InstallRas = +
  391.     StartWait
  392.     Debug-Output "In InstallRas Section"
  393.     Debug-Output "Origin is "$(!NTN_Origination)
  394.     Debug-Output "Install Mode "$(!NTN_InstallMode)
  395.     Debug-Output "Install phase "$(!NTN_InstallPhase)
  396.     Debug-Output "Copy Flag is "$(DoCopy)
  397.     Debug-Output "Option is "$(Option)
  398.     Debug-Output "SrcDir is "$(SourceDir)
  399.     Debug-Output "STF_WINDOWSPATH is "$(!STF_WINDOWSPATH)
  400.     Debug-Output "Context Inf name "$(STF_CONTEXTINFNAME)
  401.     Debug-Output "!STF_UNATTENDED is "$(!STF_UNATTENDED)
  402.     Debug-Output "!STF_GUI_UNATTENDED is "$(!STF_GUI_UNATTENDED)
  403.     Debug-Output "!STF_UNATTENDED_SECTION is "$(!STF_UNATTENDED_SECTION)
  404.     set RasComponentsList = {} 
  405.     set NumInstalled = 0       
  406.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(!MAXIMUM_ALLOWED) KeyProduct
  407.     Ifstr $(KeyProduct) != $(KeyNull)
  408.         Ifstr(i) $(!NTN_InstallPhase) == primary
  409.            set CommonStatus = STATUS_USERCANCEL
  410.            goto end
  411.         EndIf
  412.         GetRegValue $(KeyProduct) "MajorVersion" VersionInfo
  413.         set VersionMajor = *($(VersionInfo), 4)
  414.         GetRegValue $(KeyProduct) "MinorVersion" VersionInfo
  415.         set VersionMinor = *($(VersionInfo), 4)
  416.         set InstalledVersion = $(VersionMajor)"."$(VersionMinor)
  417.         ifstr(i) $(ProductVersion) != $(InstalledVersion)
  418.             Shell "" QueryRasUpgrade $(ProductRASTitle) $(InstalledVersion) +
  419.                                      $(ProductVersion)
  420.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  421.                goto ShellCodeError
  422.             endif
  423.             Ifstr(i) $($R1) == "OK"
  424.                 set from = InstallRas
  425.                 set to   = InstallRas1
  426.                 goto RemoveRas
  427.             else
  428.                 goto end
  429.             endif
  430.         endif
  431.         shell "" QueryComponentsInstalled $(ProductKeyName)
  432.         Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  433.             Set RasComponentsList = $($R1)
  434.             Set InstalledFlags = $($R2)
  435.             Set ServerInstalled = *($(InstalledFlags),1)
  436.             Set ClientInstalled = *($(InstalledFlags),2)
  437.             Set AdminInstalled  = *($(InstalledFlags),3)
  438.         Endif
  439.         Debug-Output "Installed List is "$(RasComponentsList)
  440.         Debug-Output "Installed Flags is "$(InstalledFlags)
  441.         QueryListSize NumInstalled $(RasComponentsList)
  442.         ifint $(NumInstalled) == 3
  443.             read-syms VerExists$(!STF_LANGUAGE)
  444.             set Text = $(Product$(Option)Title)$(Ver)$(ProductVersion)+
  445.                        $(Text1)
  446.             Shell $(subroutninf), SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(Text)
  447.             Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  448.                 Goto fatal
  449.             Else-Ifstr(i) $($R0) == STATUS_FAILED
  450.                 Goto fatal
  451.             Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  452.                 Goto end
  453.             Endif
  454.             goto end
  455.         endif
  456.         CloseRegKey $(KeyProduct)
  457.     else
  458. InstallRas1 =+
  459.        set fRemoveRas   = TRUE
  460.     endif
  461.     goto memorycheck
  462. setupabort = +
  463.     read-syms SetupAbortDlg$(!STF_LANGUAGE)
  464.     ui start "SetupAbort"
  465.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  466.         ui pop 1
  467.         Exit
  468.     else
  469.         ui pop 1
  470.         Exit
  471.     endif
  472. memorycheck = +
  473.     read-syms AvailableSystemMemory
  474.     detect AvailableSystemMemory
  475.     Debug-Output "Available Memory is "$(SystemMemory)
  476.     IfInt $(SystemMemory) < $(MinSystemMemory)
  477.         read-syms FatalErrorMem$(!STF_LANGUAGE)
  478.         shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "FATAL" $(Fatal)
  479.         goto setupabort
  480.     Else
  481.         goto InstallNetwork
  482.     EndIf
  483. InstallNetwork =+
  484.     ifstr(i) $(DoServer) == FALSE
  485.        ifstr(i) $(DoClient) == FALSE
  486.            goto CopyResources
  487.        endif
  488.     endif
  489.     goto CopyResources
  490. CopyResources = +
  491.     ifstr(i) $(!NTN_InstallMode) == "install"
  492.         Ifstr(i) $(DoCopy) == "YES"
  493.            Shell $(!UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SourceDir) YES
  494.            Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  495.                Goto ShellCodeError
  496.            Else-Ifstr(i) $($R0) == STATUS_FAILED
  497.                Shell $(!UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  498.                ifint $($ShellCode) != $(!SHELL_CODE_OK)
  499.                    goto ShellCodeError
  500.                endif
  501.                set Error = $($R0)
  502.                goto fatal
  503.            Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  504.                Goto end
  505.            Endif
  506.            Set !STF_SRCDIR = $($R1)
  507.            Set SourceDir  = $($R1)
  508.            Debug-Output "SrcDir "$(SourceDir)
  509.         endif
  510.         Debug-Output "OEMNSVRA.INF: Copying files"
  511.         Install InstallResources
  512.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  513.             goto filecopycancel
  514.         endif
  515.         install InstallRasFiles
  516.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  517.             goto filecopycancel
  518.         endif
  519.     endif
  520.     StartWait
  521.     ifstr(i) $(DoAdminOnly) == TRUE
  522.         goto CommonCode
  523.     endif
  524.     goto PortsConfigure
  525. ConfigureRas = +
  526.     set OldVersionExisted = $(TRUE)
  527.     read-syms StatusDeterminingConfig$(!STF_LANGUAGE)
  528.     shell $(subroutninf) PushBillBoard NETSTATUSDLG $(ReadingConfig)
  529.     Set BillboardVisible = 1
  530.     StartWait
  531.     shell "" QueryComponentsInstalled
  532.     Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  533.         Set InstalledComps = $($R1)
  534.         Set InstalledFlags = $($R2)
  535.         Set DoServer      = *($(InstalledFlags),1)
  536.         Set DoClient      = *($(InstalledFlags),2)
  537.         Set DoAdmin       = *($(InstalledFlags),3)
  538.         Set DoServerOnly  = *($(InstalledFlags),4)
  539.         Set DoClientOnly  = *($(InstalledFlags),5)
  540.         Set DoAdminOnly   = *($(InstalledFlags),6)
  541.     Endif
  542.     Set ServerInstalled = $(DoServer)
  543.     Set ClientInstalled = $(DoClient)
  544.     Set AdminInstalled  = $(DoAdmin)
  545.     Debug-Output "DoServer "$(DoServer)
  546.     Debug-Output "DoClient "$(DoClient)
  547.     Debug-Output "DoAdmin "$(DoAdmin)
  548.     Debug-Output "DoServerOnly "$(DoServerOnly)
  549.     Debug-Output "DoClientOnly "$(DoClientOnly)
  550.     Debug-Output "DoAdminOnly "$(DoAdminOnly)
  551.     Ifint $(BillboardVisible) != 0
  552.         Shell "subroutn.inf" PopBillboard
  553.         Set BillboardVisible = 0
  554.     Endif
  555.     ifstr(i) $(DoAdminOnly) == TRUE
  556.         read-syms NoConfigAdmin$(!STF_LANGUAGE)
  557.         shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "STATUS" $(NoConfigAdmin)
  558.         goto end
  559.     endif
  560.     goto PortsConfigure
  561. PortsConfigure = +
  562.     StartWait
  563.     read-syms StatusDeterminingConfig$(!STF_LANGUAGE)
  564.     shell $(subroutninf) PushBillBoard NETSTATUSDLG $(ReadingConfig)
  565.     Set BillboardVisible = 1
  566.     LoadLibrary "x" $(!STF_CWDDIR)rascfg.dll PORTSDLGHANDLE
  567.     set Result = {}
  568.     set fNetcardInstalled = FALSE
  569.     shell "" IsNetcardInstalled
  570.     ifstr(i) $($R0) == STATUS_SUCCESSFUL
  571.         set fNetcardInstalled = $($R1)
  572.     endif
  573.     Debug-Output "fNetcardInstalled Option "$(fNetcardInstalled)
  574. CheckProtocolsInstalled =+
  575.     shell "" QueryInstalledProtocols
  576.     ifstr(i) $($R0) == STATUS_SUCCESSFUL
  577.         set fNetbeuiInstalled = $($R1)
  578.         set fTcpIpInstalled   = $($R2)
  579.         set fIpxInstalled     = $($R3)
  580.     else
  581.         read-syms QueryInstalledProtocolsError$(!STF_LANGUAGE)
  582.         shell $(subroutninf) SetupMessage $(!STF_LANGUAGE) "FATAL" $(Text)
  583.         goto end
  584.     endif
  585.     Ifint $(BillboardVisible) != 0
  586.         Shell "subroutn.inf" PopBillboard
  587.         Set BillboardVisible = 0
  588.     Endif
  589.     Debug-Output "!STF_UNATTENDED is "$(!STF_UNATTENDED)
  590.     Debug-Output "!STF_GUI_UNATTENDED is "$(!STF_GUI_UNATTENDED)
  591.     Debug-Output "!STF_UNATTENDED_SECTION is "$(!STF_UNATTENDED_SECTION)
  592.     LibraryProcedure Result, $(PORTSDLGHANDLE), RasPortsConfig $(!STF_HWND) +
  593.                      $(!NTN_InstallMode) $(fNetcardInstalled) $(ProductPath) +
  594.                      $(fNetbeuiInstalled) $(fTcpIpInstalled) $(fIpxInstalled) +
  595.                      $(!STF_GUI_UNATTENDED) $(!STF_UNATTENDED) $(!STF_UNATTENDED_SECTION)
  596.     StartWait
  597.     set NewNumPorts   = 0
  598.     set NewNumTapiPorts = 0
  599.     set NewNumDialoutNBF = 0
  600.     set NewNumDialinNBF  = 0
  601.     set NewNumDialinIP = 0
  602.     set NewNumDialoutIP = 0
  603.     set NewNumDialinoutIPX = 0
  604.     set fSerialInstalled = FALSE
  605.     set fUnimodemInstalled = FALSE
  606.     set fOtherInstalled = FALSE
  607.     set fNetbeuiChosen = FALSE
  608.     set fTcpIpChosen = FALSE
  609.     set fIpxChosen = FALSE
  610.     set fNetbeuiSelected = FALSE
  611.     set fTcpIpSelected = FALSE
  612.     set fIpxSelected = FALSE
  613.     set fNetbeuiAllowed = FALSE
  614.     set fTcpIpAllowed = FALSE
  615.     set fIpxAllowed = FALSE
  616.     set NewNumPorts       = *($(Result),1)
  617.     set NewNumTapiPorts   = *($(Result),2)
  618.     set NewNumPortsList = {}
  619.     set NullString   = ""
  620.     Debug-Output "PortsConfigure returned: "$(Result)
  621.     Debug-Output "PortsConfigure NewNumPorts: "$(NewNumPorts)
  622.     Debug-Output "PortsConfigure NewNumTapiPorts: "$(NewNumTapiPorts)
  623.     ifstr(i) $(NewNumPorts) == "EXITSETUP"
  624.         Debug-Output "PortsConfigre User selected ExitSetup."
  625.         goto RemoveDiskFiles
  626.     else-ifstr(i) $(NewNumPorts) == "NOPORTS"
  627.         Debug-Output "PortsConfigre: No serial ports detected."
  628.         shell $(subroutninf) SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorNoPorts)
  629.         goto RemoveDiskFiles
  630.     else-ifstr(i) $(NewNumPorts) == "BADARGS"
  631.         Debug-Output "PortsConfigre: bad arguments to dll."
  632.         shell $(subroutninf) SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorBadArgs)
  633.         goto RemoveDiskFiles
  634.     else-ifstr(i) $(NewNumPorts) == "FAILURE"
  635.         Debug-Output "PortsConfigre: Unknown failure."
  636.         shell $(subroutninf) SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorUnknown)
  637.         goto RemoveDiskFiles
  638.     endif
  639.     goto PortsConfigure1
  640. RemoveDiskFiles = +
  641.     set CommonStatus = STATUS_USERCANCEL
  642.     ifstr(i) $(!NTN_InstallMode) == "install"
  643.         goto filecopycancel
  644.     endif
  645.     goto end
  646. PortsConfigure1 = +
  647.     set NewNumDialoutNBF = *($(Result),3)
  648.     Debug-Output "PortsConfigure NewNumDialoutNBF: "$(NewNumDialoutNBF)
  649.     set NewNumDialinNBF  = *($(Result),4)
  650.     Debug-Output "PortsConfigure NewNumDialinNBF: "$(NewNumDialinNBF)
  651.     set fSerialInstalled = *($(Result),5)
  652.     Debug-Output "PortsConfigure fSerialInstalled: "$(fSerialInstalled)
  653.     set fUnimodemInstalled = *($(Result),6)
  654.     Debug-Output "PortsConfigure fUnimodemInstalled: "$(fUnimodemInstalled)
  655.     set fOtherInstalled = *($(Result),7)
  656.     Debug-Output "PortsConfigure fOtherInstalled: "$(fOtherInstalled)
  657.     ifstr(i) $(fSerialInstalled) == TRUE
  658.         set NewNumPortsList = >($(NewNumPortsList), $(NullString)$(NewNumPorts)$(NullString))
  659.     else-ifstr(i) $(fOtherInstalled) == TRUE
  660.         set NewNumPortsList = >($(NewNumPortsList), $(NullString)$(NewNumPorts)$(NullString))
  661.     else-ifstr(i) $(fUnimodemInstalled) == TRUE
  662.         set NewNumPortsList = >($(NewNumPortsList), $(NullString)$(NewNumPorts)$(NullString))
  663.     endif
  664.     set fNetbeuiSelected = *($(Result),8)
  665.     Debug-Output "PortsConfigure NetbeuiSelected: "$(fNetbeuiSelected)
  666.     set fTcpIpSelected = *($(Result),9)
  667.     Debug-Output "PortsConfigure TcpIpSelected: "$(fTcpIpSelected)
  668.     set fIpxSelected = *($(Result),10)
  669.     Debug-Output "PortsConfigure IpxSelected: "$(fIpxSelected)
  670.     set fNetbeuiAllowed = *($(Result),11)
  671.     Debug-Output "PortsConfigure NetbeuiAllowed: "$(fNetbeuiAllowed)
  672.     set fTcpIpAllowed = *($(Result),12)
  673.     Debug-Output "PortsConfigure TcpIpAllowed: "$(fTcpIpAllowed)
  674.     set fIpxAllowed = *($(Result),13)
  675.     Debug-Output "PortsConfigure IpxAllowed: "$(fIpxAllowed)
  676.     ifstr(i) $(fNetbeuiSelected) == TRUE
  677.         set fNetbeuiChosen = TRUE
  678.     else
  679.         set fNetbeuiChosen = $(fNetbeuiAllowed)
  680.     endif
  681.     ifstr(i) $(fTcpIpSelected) == TRUE
  682.         set fTcpIpChosen = TRUE
  683.     else
  684.         set fTcpIpChosen = $(fTcpIpAllowed)
  685.     endif
  686.     ifstr(i) $(fIpxSelected) == TRUE
  687.         set fIpxChosen = TRUE
  688.     else
  689.         set fIpxChosen = $(fIpxAllowed)
  690.     endif
  691.     ifstr(i) $(fTcpIpSelected) == TRUE
  692.         set NewNumDialoutIP = $(NewNumDialoutNBF)
  693.     endif
  694.     ifint $(NewNumDialinNBF) != 0
  695.          ifstr(i) $(fTcpIpAllowed) == TRUE
  696.              set NewNumDialinIP = 1
  697.          endif
  698.     endif
  699.     Debug-Output "NewNumDialinIP: "$(NewNumDialinIP)
  700.     Debug-Output "NewNumDialoutIP: "$(NewNumDialoutIP)
  701.     ifstr(i) $(fIpxChosen) == TRUE
  702.         set NewNumDialinoutIPX = 1
  703.         Debug-Output "IPX Selected - NewNumDialinoutIPX: "$(NewNumDialinoutIPX)
  704.     endif
  705.     ifstr(i) $(fIpxAllowed) == TRUE
  706.         set EnableIpxRouter = 1
  707.     else
  708.         set EnableIpxRouter = 0
  709.     endif
  710.     ifstr(i) $(fNetbeuiAllowed) == FALSE
  711.          set NewNumDialinNBF = 0
  712.     endif
  713.     ifstr(i) $(fNetbeuiSelected) == FALSE
  714.         set NewNumDialoutNBF = 0
  715.     endif
  716.     Debug-Output "NewNumDialinNbf: "$(NewNumDialinNBF)
  717.     Debug-Output "NewNumDialoutNbf: "$(NewNumDialoutNBF)
  718.     set NetBiosGtwyEnabled = 0
  719.     set EnableIpRouter     = 0
  720.     set EnableWanRouter    = 0
  721.     Shell "" GetNetworkAccess
  722.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  723.         Debug-Output "error shelling GetNetworkAccess."
  724.         goto ShellCodeError
  725.     endif
  726.     set NetBiosGtwyEnabled = $($R1)
  727.     set EnableIpRouter     = $($R2)
  728.     set EnableWanRouter    = $($R3)
  729.     ifint $(NetBiosGtwyEnabled) == 0
  730.         ifstr(i) $(fNetbeuiAllowed) == TRUE
  731.             set-add NewNumDialoutNBF  = $(NewNumDialoutNBF), $(NewNumDialinNBF)
  732.             set     NewNumDialinNBF = 0
  733.             Debug-Output "Mapped dialin ports to dialout ports "$(NewNumDialoutNBF)
  734.         endif
  735.     endif
  736.     set NewNumDialin = 0
  737.     set NewNumDialout = 0
  738.     set-add NewNumDialin = $(NewNumDialinNBF), $(NewNumDialinIP)
  739.     ifstr(i) $(fIpxAllowed) == TRUE
  740.         set-add NewNumDialin = $(NewNumDialin), $(NewNumDialinoutIPX)
  741.     endif
  742.     set-add NewNumDialout = $(NewNumDialoutNBF), $(NewNumDialoutIP)
  743.     ifstr(i) $(fIpxSelected) == TRUE
  744.         set-add NewNumDialout = $(NewNumDialout), $(NewNumDialinoutIPX)
  745.     endif
  746.     ifstr(i) $(fNetcardInstalled) == FALSE
  747.         ifint $(NewNumDialin) != 0
  748.             ifstr(i) $(!STF_INSTALL_MODE) != EXPRESS
  749.                read-syms InstallLoopback$(!STF_LANGUAGE)
  750.                Shell $(subroutninf) SetupMessage, $(!STF_LANGUAGE), "STATUS", $(Message)
  751.             else
  752.                set AddCopy  = YES
  753.                set DoCopy   = YES
  754.                set DoConfig = YES
  755.                set SaveNTN_InstallMode = $(!NTN_InstallMode)
  756.                set !NTN_InstallMode = install
  757.                Shell "oemnadlb.inf" InstallOption $(!STF_LANGUAGE) "LOOP" $(!STF_SRCDIR) $(AddCopy) $(DoCopy) $(DoConfig)
  758.                set !NTN_InstallMode = $(SaveNTN_InstallMode)
  759.                Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  760.                    Debug-Output "OEMNSVRA.INF: INF oemnadlb.inf SHELL ERROR!"
  761.                    read-syms InstallLoopback$(!STF_LANGUAGE)
  762.                    Shell $(subroutninf) SetupMessage, $(!STF_LANGUAGE), "STATUS", $(Error)
  763.                Endif
  764.             EndIf
  765.         endif
  766.     endif
  767.     goto CommonCode
  768. CommonCode = +
  769.     ifstr(i) $(OldVersionExisted) == $(TRUE)
  770.         ifstr(i) $(!NTN_InstallMode) == configure
  771.            goto WriteParameters
  772.         endif
  773.     endif
  774.     QueryListSize ListCount $(RasComponentsList)
  775.     ifint $(ListCount) == 0
  776.         goto FirstTimeInstall
  777.     else
  778.         ifstr(i) $(DoServer) == TRUE
  779.             ifstr(i) $(ClientInstalled) == FALSE
  780.                 ifstr(i) $(AdminInstalled) == FALSE
  781.                    set DoRas    = TRUE
  782.                 endif
  783.                 set DoRasSvr     = TRUE
  784.                 set DoRasMan     = TRUE
  785.                 set DoNdisWan    = TRUE
  786.                 set DoRasAsyMac  = TRUE
  787.             else
  788.                 set DoRasSvr     = TRUE
  789.             endif
  790.             set RasComponentsList = >($(RasComponentsList), $(RasServerOption))
  791.         endif
  792.         ifstr(i) $(DoClient) == TRUE
  793.             ifstr(i) $(ServerInstalled) == FALSE
  794.                 ifstr(i) $(AdminInstalled) == FALSE
  795.                     set DoRas    = TRUE
  796.                 endif
  797.                 set DoRasMan     = TRUE
  798.                 set DoNdisWan    = TRUE
  799.                 set DoRasAsyMac  = TRUE
  800.             endif
  801.             set RasComponentsList = >($(RasComponentsList), $(RasClientOption))
  802.         endif
  803.         ifstr(i) $(DoAdmin) == TRUE
  804.             ifstr(i) $(ServerInstalled) == FALSE
  805.                 ifstr(i) $(ClientInstalled) == FALSE
  806.                     set DoRas = TRUE
  807.                 endif
  808.             endif
  809.             set RasComponentsList = >($(RasComponentsList), $(RasAdminOption))
  810.         endif
  811.         shell "" UpdateComponentsInstalled $(RasComponentsList) $(ProductKeyName)
  812.         goto FirstTimeInstall-1
  813.     endif
  814. FirstTimeInstall =+
  815.     ifstr(i) $(DoServer) == TRUE
  816.         set DoRas             = TRUE
  817.         set DoRasSvr          = TRUE
  818.         set DoRasMan          = TRUE
  819.         set DoRasAutodial     = TRUE
  820.         set DoNdisWan         = TRUE
  821.         set DoRasAsyMac       = TRUE
  822.         set RasComponentsList = >($(RasComponentsList), $(RasServerOption))
  823.     endif
  824.     ifstr(i) $(DoClient) == TRUE
  825.         set DoRas             = TRUE
  826.         set DoRasMan          = TRUE
  827.         set DoRasAutodial     = TRUE
  828.         set DoNdisWan         = TRUE
  829.         set DoRasAsyMac       = TRUE
  830.         set RasComponentsList = >($(RasComponentsList), $(RasClientOption))
  831.     endif
  832.     ifstr(i) $(DoAdmin) == TRUE
  833.         set DoRas             = TRUE
  834.         set RasComponentsList = >($(RasComponentsList), $(RasAdminOption))
  835.     endif
  836. FirstTimeInstall-1 = +
  837.     ifstr(i) $(DoRas) == TRUE
  838.         StartWait
  839.         read-syms StatusUpdatingRegistry$(!STF_LANGUAGE)
  840.         shell $(subroutninf) PushBillBoard NETSTATUSDLG $(CreatingRas)
  841.         Set BillboardVisible = 1
  842.         set ThisOption = RAS
  843.         Shell $(!UtilityInf), InstallSoftwareProduct, $(!Manufacturer),+
  844.               $(Product$(ThisOption)Name), $(!RasInfName)
  845.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  846.               Debug-Output "InstallSoftware bombed out."
  847.               goto ShellCodeError
  848.         endif
  849.         set RegistryErrorIndex = $($R0)
  850.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  851.             Debug-Output "REGISTRY GOODAL"
  852.             CloseRegKey $($R1)
  853.             CloseRegKey $($R2)
  854.             goto fatalregistry
  855.         endif
  856.         Set SoftProductKey    = $($R1)
  857.         Set SoftNetRuleKey    = $($R2)
  858.         set NewValueList = +
  859.             {{Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)},+
  860.              {SoftwareType,$(NoTitle),$(!REG_VT_SZ),+
  861.               $(Product$(ThisOption)SvcType)},+
  862.              {Title,$(NoTitle),$(!REG_VT_SZ), $(Product$(ThisOption)Title)},+
  863.              {Description,$(NoTitle),$(!REG_VT_SZ),+
  864.               $(Product$(ThisOption)Description)},+
  865.              {PathName,$(NoTitle),$(!REG_VT_SZ),+
  866.               $(Product$(ThisOption)ImagePath)},+
  867.              {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMajorVersion)},+
  868.              {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMinorVersion)},+
  869.              {RasComponents,$(NoTitle),$(!REG_VT_MULTI_SZ),$(RasComponentsList)},+
  870.              {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}, +
  871.              {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)}}
  872.         Shell $(!UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  873.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  874.             CloseRegKey $(SoftProductKey)
  875.             CloseRegKey $(SoftNetRuleKey)
  876.             goto ShellCodeError
  877.         endif
  878.         set RegistryErrorIndex = $($R0)
  879.         CloseRegKey $(SoftProductKey)
  880.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  881.            CloseRegKey $(SoftNetRuleKey)
  882.            goto fatalregistry
  883.         endif
  884.         set NewValueList = +
  885.             {{class, $(NoTitle), $(!REG_VT_SZ), $(NetRule$(ThisOption)Class)},+
  886.              {type,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Type)},+
  887.              {use,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Use)}, +
  888.              {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}, +
  889.              {Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)}}
  890.         Shell  $(!UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  891.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  892.             goto ShellCodeError
  893.         endif
  894.         set RegistryErrorIndex = $($R0)
  895.         CloseRegKey $(SoftNetRuleKey)
  896.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  897.             goto fatalregistry
  898.         endif
  899.     endif 
  900.     ifstr(i) $(DoRasSvr) == TRUE
  901.         set ThisOption = RASSVR
  902.         set RasSpecificString = $(Product$(ThisOption)Name)
  903.         Shell $(!UtilityInf), AddSoftwareComponent, $(!Manufacturer), +
  904.               $(Product$(ThisOption)Name), $(Product$(ThisOption)Name), +
  905.               $(Product$(ThisOption)DisplayName), +
  906.               $(!RasInfName), $(Product$(ThisOption)ImagePath),+
  907.               "service", "Network", {"LanmanServer","RasMan"}, "", +
  908.               $(!RasMsgDll), $(!RasEventTypeSupported)
  909.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  910.             Debug-Output "DoRasSvr: AddSoftware bombed out"
  911.             goto ShellCodeError
  912.         endif
  913.         set RegistryErrorIndex = $($R0)
  914.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  915.             Debug-Output "DoRasSvr: Registry Error "$(RegistryErrorIndex)
  916.             CloseRegKey $($R1)
  917.             CloseRegKey $($R2)
  918.             CloseRegKey $($R3)
  919.             CloseRegKey $($R4)
  920.             CloseRegKey $($R5)
  921.             goto fatalregistry
  922.         endif
  923.         Set SoftProductKey    = $($R1)
  924.         Set SoftNetRuleKey    = $($R2)
  925.         set SoftServiceKey    = $($R3)
  926.         Set SoftParamsKey     = $($R4)
  927.         Set SoftLinkageKey    = $($R5)
  928.         set NewValueList = +
  929.             {{Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)},+
  930.              {ServiceName,$(NoTitle),$(!REG_VT_SZ),+
  931.               $(Product$(ThisOption)Name)},+
  932.              {SoftwareType,$(NoTitle),$(!REG_VT_SZ),+
  933.               $(Product$(ThisOption)SvcType)},+
  934.              {Title,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Title)},+
  935.              {Description,$(NoTitle),$(!REG_VT_SZ),+
  936.               $(Product$(ThisOption)Description)},+
  937.              {PathName,$(NoTitle),$(!REG_VT_SZ),+
  938.               $(Product$(ThisOption)ImagePath)},+
  939.              {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMajorVersion)},+
  940.              {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMinorVersion)},+
  941.              {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)},+
  942.              {Hidden,$(NoTitle),$(!REG_VT_DWORD),$(!HideComponent)}}
  943.         Shell  $(!UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  944.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  945.             Debug-Output "DoRasSvr:product: AddValueList bombed out"
  946.             goto ShellCodeError
  947.         endif
  948.         set RegistryErrorIndex = $($R0)
  949.         CloseRegKey $(SoftProductKey)
  950.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  951.             Debug-Output "DoRasSvr: Registry Error "$(RegistryErrorIndex)
  952.             CloseRegKey $(SoftServiceKey)
  953.             CloseRegKey $(SoftNetRuleKey)
  954.             CloseRegKey $(SoftLinkageKey)
  955.             CloseRegKey $(SoftParamsKey)
  956.             goto fatalregistry
  957.         endif
  958.         set NewValueList = +
  959.             {{class, $(NoTitle), $(!REG_VT_SZ), $(NetRule$(ThisOption)Class)},+
  960.              {type,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Type)},+
  961.              {use,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Use)}, +
  962.              {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}, +
  963.              {bindform,$(NoTitle),$(!REG_VT_SZ),+
  964.               $(NetRule$(ThisOption)BindForm)}, +
  965.              {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),+
  966.               $(NetRule$(ThisOption)Bindable)}, +
  967.              {Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)}}
  968.         Shell  $(!UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  969.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  970.             Debug-Output "DoRasSvr:netrules: AddValueList bombed out"
  971.             goto ShellCodeError
  972.         endif
  973.         set RegistryErrorIndex = $($R0)
  974.         CloseRegKey $(SoftNetRuleKey)
  975.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  976.             CloseRegKey $(SoftServiceKey)
  977.             CloseRegKey $(SoftLinkageKey)
  978.             CloseRegKey $(SoftParamsKey)
  979.             Debug-Output "DoRasSvr: Registry Error "$(RegistryErrorIndex)
  980.             goto fatalregistry
  981.         endif
  982.         set RasDependencies = {"LanmanServer","RasMan"}
  983.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\NetBios" $(!MAXIMUM_ALLOWED) KeyNetBios
  984.         ifstr $(KeyNetBios) != $(KeyNull)
  985.             set RasDependencies = >($(RasDependencies),"NetBios")
  986.         endif
  987.         Debug-Output "DoRasSvr: Adding RasDependencies "$(RasDependencies)
  988.         set NewValueList = +
  989.             {{OtherDependencies, $(NoTitle), $(!REG_VT_MULTI_SZ),+
  990.               $(RasDependencies)}}
  991.         Shell  $(!UtilityInf), AddValueList, $(SoftLinkageKey), $(NewValueList)
  992.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  993.             Debug-Output "DoRasSvr:Linkage: AddValueList bombed out"
  994.             goto ShellCodeError
  995.         endif
  996.         set RegistryErrorIndex = $($R0)
  997.         CloseRegKey $(SoftLinkageKey)
  998.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  999.             CloseRegKey $(SoftServiceKey)
  1000.             Debug-Output "DoRasSvr: Registry Error "$(RegistryErrorIndex)
  1001.             goto fatalregistry
  1002.         endif
  1003.         set NewValueList = +
  1004.             {{AuthenticateRetries, $(NoTitle), $(!REG_VT_DWORD), 2},+
  1005.             {AuthenticateTime, $(NoTitle), $(!REG_VT_DWORD), 120},+
  1006.             {Autodisconnect, $(NoTitle), $(!REG_VT_DWORD), 20},+
  1007.             {EnableAudit, $(NoTitle), $(!REG_VT_DWORD), 1},+
  1008.             {CallbackTime, $(NoTitle), $(!REG_VT_DWORD), 2}}
  1009.         Shell  $(!UtilityInf), AddValueList, $(SoftParamsKey), $(NewValueList)
  1010.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1011.              Debug-Output "AddValueList bombed out"
  1012.              goto ShellCodeError
  1013.         endif
  1014.         set RegistryErrorIndex = $($R0)
  1015.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1016.             CloseRegKey $(SoftServiceKey)
  1017.             goto fatalregistry
  1018.         endif
  1019.         OpenRegKey $(SoftParamsKey) "" "NetBiosGateway" $(!MAXIMUM_ALLOWED) KeyNetbiosGtwy
  1020.         ifstr $(KeyNtbiosGtwy) == $(KeyNull)
  1021.             CreateRegKey $(SoftParamsKey) {"NetBiosGateway",$(NoTitle),GenericClass} "" $(!MAXIMUM_ALLOWED) "" KeyNetbiosGtwy
  1022.             OpenRegKey $(SoftParamsKey) "" "NetBiosGateway" $(!MAXIMUM_ALLOWED) KeyNetbiosGtwy
  1023.         endif
  1024.         set NewValueList = +
  1025.             {{EnableBroadcast, $(NoTitle), $(!REG_VT_DWORD), 0},+
  1026.             {EnableNetbiosSessionsAuditing, $(NoTitle), $(!REG_VT_DWORD), 0},+
  1027.             {MaxDynMem, $(NoTitle), $(!REG_VT_DWORD), 655350},+
  1028.             {MaxNames, $(NoTitle), $(!REG_VT_DWORD), 255},+
  1029.             {MaxSessions, $(NoTitle), $(!REG_VT_DWORD), 255},+
  1030.             {MulticastForwardRate, $(NoTitle), $(!REG_VT_DWORD), 5},+
  1031.             {SizWorkbuf, $(NoTitle), $(!REG_VT_DWORD), 4500},+
  1032.             {RemoteListen, $(NoTitle), $(!REG_VT_DWORD), 1},+
  1033.             {NameUpdateTime, $(NoTitle), $(!REG_VT_DWORD), 120},+
  1034.             {MaxDgBufferedPerGroupName, $(NoTitle), $(!REG_VT_DWORD), 10},+
  1035.             {RcvDgSubmittedPerGroupName, $(NoTitle), $(!REG_VT_DWORD), 3},+
  1036.             {DisableMcastFwdWhenSessionTraffic, $(NoTitle), $(!REG_VT_DWORD), 1},+
  1037.             {MaxBcastDgBuffered, $(NoTitle), $(!REG_VT_DWORD), 32},+
  1038.             {NumRecvQueryIndications, $(NoTitle), $(!REG_VT_DWORD), 3}}
  1039.         Shell  $(!UtilityInf), AddValueList, $(KeyNetbiosGtwy), $(NewValueList)
  1040.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1041.              Debug-Output "AddValueList bombed out"
  1042.              goto ShellCodeError
  1043.         endif
  1044.         set RegistryErrorIndex = $($R0)
  1045.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1046.             CloseRegKey $(SoftServiceKey)
  1047.             goto fatalregistry
  1048.         endif
  1049.         CloseRegKey $(KeyNetbiosGtwy)
  1050.         CloseRegKey $(SoftParamsKey)
  1051.         Shell "" UpdatePerfmonInfoHelper $(SoftServiceKey)
  1052.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1053.             Debug-Output "error shelling UpdatePerfmonInfoHelper."
  1054.             goto ShellCodeError
  1055.         endif
  1056.         Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  1057.             Debug-Output "error returned by UpdatePerfmonInfoHelper."
  1058.         endif
  1059.         CloseRegKey $(SoftServiceKey)
  1060.     endif 
  1061. InstallRasMan = +
  1062.     ifstr(i) $(DoRasMan) == TRUE
  1063.         set ThisOption = RASMAN
  1064.         set RasSpecificString = $(Product$(ThisOption)Name)
  1065.         Shell $(!UtilityInf), AddSoftwareComponent, $(!Manufacturer), +
  1066.               $(Product$(ThisOption)Name), $(Product$(ThisOption)Name), +
  1067.               $(Product$(ThisOption)DisplayName), +
  1068.               $(!RasInfName), $(Product$(ThisOption)ImagePath), "serviceshare",+
  1069.               "Network", {}, "", $(!RasMsgDll), $(!RasEventTypeSupported)
  1070.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1071.             Debug-Output "AddSoftware bombed out"
  1072.             goto ShellCodeError
  1073.         endif
  1074.         set RegistryErrorIndex = $($R0)
  1075.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1076.             CloseRegKey $($R1)
  1077.             CloseRegKey $($R2)
  1078.             CloseRegKey $($R3)
  1079.             CloseRegKey $($R4)
  1080.             CloseRegKey $($R5)
  1081.             goto fatalregistry
  1082.         endif
  1083.         Set SoftProductKey    = $($R1)
  1084.         Set SoftNetRuleKey    = $($R2)
  1085.         CloseRegKey $($R3)
  1086.         Set SoftParamsKey     = $($R4)
  1087.         CloseRegKey $($R5)
  1088.         set NewValueList = +
  1089.             {{Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)},+
  1090.              {ServiceName,$(NoTitle),$(!REG_VT_SZ),+
  1091.               $(Product$(ThisOption)Name)},+
  1092.              {SoftwareType,$(NoTitle),$(!REG_VT_SZ),+
  1093.               $(Product$(ThisOption)SvcType)},+
  1094.              {Title,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Title)},+
  1095.              {Description,$(NoTitle),$(!REG_VT_SZ),+
  1096.               $(Product$(ThisOption)Description)},+
  1097.              {PathName,$(NoTitle),$(!REG_VT_SZ),+
  1098.               $(Product$(ThisOption)ImagePath)},+
  1099.              {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMajorVersion)},+
  1100.              {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMinorVersion)},+
  1101.              {Review, $(NoTitle), $(!REG_VT_DWORD), $(fReviewBindings)}, +
  1102.              {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)},+
  1103.              {Hidden,$(NoTitle),$(!REG_VT_DWORD),$(!HideComponent)}}
  1104.         Shell  $(!UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  1105.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1106.             Debug-Output "AddValueList bombed out"
  1107.             goto ShellCodeError
  1108.         endif
  1109.         set RegistryErrorIndex = $($R0)
  1110.         CloseRegKey $(SoftProductKey)
  1111.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1112.             CloseRegKey $(SoftNetRuleKey)
  1113.             CloseRegKey $(SoftParamsKey)
  1114.             goto fatalregistry
  1115.         endif
  1116.         set NewValueList = +
  1117.             {{class, $(NoTitle), $(!REG_VT_SZ), $(NetRule$(ThisOption)Class)},+
  1118.              {type,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Type)},+
  1119.              {use,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Use)}, +
  1120.              {bindform,$(NoTitle),$(!REG_VT_SZ),+
  1121.               $(NetRule$(ThisOption)BindForm)}, +
  1122.              {bindable,$(NoTitle),$(!REG_VT_SZ),+
  1123.               $(NetRule$(ThisOption)Bindable)}, +
  1124.              {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}, +
  1125.              {Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)}}
  1126.         Shell  $(!UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  1127.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1128.             Debug-Output "AddValueList bombed out"
  1129.             goto ShellCodeError
  1130.         endif
  1131.         set RegistryErrorIndex = $($R0)
  1132.         CloseRegKey $(SoftNetRuleKey)
  1133.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1134.             goto fatalregistry
  1135.         endif
  1136.         set NewValueList = {{Logging, $(NoTitle), $(!REG_VT_DWORD), 0}}
  1137.         Shell  $(!UtilityInf), AddValueList, $(SoftParamsKey), $(NewValueList)
  1138.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1139.              Debug-Output "AddValueList bombed out"
  1140.              goto ShellCodeError
  1141.         endif
  1142.         set RegistryErrorIndex = $($R0)
  1143.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1144.             goto fatalregistry
  1145.         endif
  1146.         CloseRegKey $(SoftParamsKey)
  1147.         Shell "" AddServiceDependency "RasMan" "tapisrv"
  1148.     endif 
  1149.     ifstr(i) $(DoRasAutodial) == TRUE
  1150.         set ThisOption = RASAUTODIAL
  1151.         set RasSpecificString = $(!Product$(ThisOption)Name)
  1152.         Shell "" InstallSoftwareAndService $(ThisOption)
  1153.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1154.              Debug-Output "Error shelling InstallSoftwareAndService for "$(ThisOption)
  1155.              goto ShellCodeError
  1156.         endif
  1157.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  1158.              Debug-Output "Error from InstallSoftwareAndService for"$(ThisOption)
  1159.              goto end
  1160.         endif
  1161.         set DisableAutoDial = FALSE
  1162.         ifint $(NewNumDialout) == 0
  1163.            set DisableAutoDial = TRUE
  1164.         endif
  1165.         ifstr(i) $(DisableAutoDial) == TRUE
  1166.            OpenRegKey $(!REG_H_LOCAL) "" $(!RasAutodialKeyName) $(!MAXIMUM_ALLOWED) KeyAutodial
  1167.            ifstr $(KeyAutodial) == $(KeyNull)
  1168.              Debug-Output "OEMNSVRA.INF: could not open RasAuto key"
  1169.            else
  1170.              SetRegValue $(KeyAutodial) {Start, $(NoTitle), $(!REG_VT_DWORD), 4}
  1171.              CloseRegKey $(KeyAutodial)
  1172.            endif
  1173.         endif
  1174.         Shell "" InstallRasAcdService
  1175.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1176.              Debug-Output "Error shelling InstallRasAcdService"
  1177.              goto ShellCodeError
  1178.         endif
  1179.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  1180.              Debug-Output "Error from InstallRasAcdService"
  1181.              goto end
  1182.         endif
  1183.         Shell "" AddServiceDependency "RasAuto" "RasMan"
  1184.     endif 
  1185.     ifstr(i) $(DoNdisWan) == TRUE
  1186.         set ThisOption = NDISWAN
  1187.         set RasSpecificString = $(Product$(ThisOption)Name)
  1188.         Shell $(!UtilityInf), AddSoftwareComponent, $(!Manufacturer), +
  1189.               $(!Product$(ThisOption)Name), $(!Product$(ThisOption)Name), +
  1190.               $(!Product$(ThisOption)DisplayName), +
  1191.               $(!RasInfName), $(!Product$(ThisOption)ImagePath),+
  1192.               "kernelautostart", "NDISWAN", {}, "", +
  1193.               $(!RasMsgDll), $(!RasEventTypeSupported)
  1194.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1195.             Debug-Output "AddSoftware bombed out"
  1196.             goto ShellCodeError
  1197.         endif
  1198.         set RegistryErrorIndex = $($R0)
  1199.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1200.             CloseRegKey $($R1)
  1201.             CloseRegKey $($R2)
  1202.             CloseRegKey $($R3)
  1203.             CloseRegKey $($R4)
  1204.             CloseRegKey $($R5)
  1205.             goto fatalregistry
  1206.         endif
  1207.         Set SoftProductKey    = $($R1)
  1208.         Set SoftNetRuleKey    = $($R2)
  1209.         CloseRegKey $($R3)
  1210.         CloseRegKey $($R4)
  1211.         CloseRegKey $($R5)
  1212.         set NewValueList = +
  1213.             {{Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)},+
  1214.              {ServiceName,$(NoTitle),$(!REG_VT_SZ),+
  1215.               $(!Product$(ThisOption)Name)},+
  1216.              {SoftwareType,$(NoTitle),$(!REG_VT_SZ),+
  1217.               $(Product$(ThisOption)Type)},+
  1218.              {Title,$(NoTitle),$(!REG_VT_SZ),$(!Product$(ThisOption)Title)},+
  1219.              {Description,$(NoTitle),$(!REG_VT_SZ),+
  1220.               $(!Product$(ThisOption)Description)},+
  1221.              {PathName,$(NoTitle),$(!REG_VT_SZ),+
  1222.               $(!Product$(ThisOption)ImagePath)},+
  1223.              {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMajorVersion)},+
  1224.              {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMinorVersion)},+
  1225.              {BindControl,$(NoTitle),$(!REG_VT_DWORD),$(HideBindings)},+
  1226.              {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)},+
  1227.              {Hidden,$(NoTitle),$(!REG_VT_DWORD),$(!HideComponent)}}
  1228.         Shell  $(!UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  1229.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1230.             Debug-Output "AddValueList bombed out"
  1231.             goto ShellCodeError
  1232.         endif
  1233.         set RegistryErrorIndex = $($R0)
  1234.         CloseRegKey $(SoftProductKey)
  1235.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1236.             CloseRegKey $(SoftNetRuleKey)
  1237.             goto fatalregistry
  1238.         endif
  1239.         set NewValueList = +
  1240.         {{class, $(NoTitle), $(!REG_VT_MULTI_SZ), $(!NetRule$(ThisOption)Class)},+
  1241.              {type,$(NoTitle),$(!REG_VT_SZ),$(!NetRule$(ThisOption)Type)},+
  1242.              {use,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Use)}, +
  1243.              {bindform,$(NoTitle),$(!REG_VT_SZ),+
  1244.               $(!NetRule$(ThisOption)BindForm)}, +
  1245.              {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),+
  1246.               $(!NetRule$(ThisOption)Bindable)}, +
  1247.              {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}, +
  1248.              {Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)}}
  1249.         Shell  $(!UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  1250.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1251.             Debug-Output "AddValueList bombed out"
  1252.             goto ShellCodeError
  1253.         endif
  1254.         set RegistryErrorIndex = $($R0)
  1255.         CloseRegKey $(SoftNetRuleKey)
  1256.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1257.             goto fatalregistry
  1258.         endif
  1259.         Shell "" InstallNdisWanBHAdapter
  1260.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1261.            Debug-Output "Cannot add NdisWan Blood hound adapter"
  1262.            goto ShellCodeError
  1263.         endif
  1264.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  1265.              set RegistryErrorIndex = $($R0)
  1266.              Debug-Output "Error installing NdisWan Blood hound adapter"
  1267.              goto fatalregistry
  1268.         endif
  1269.         Shell "" AddNDISWANToServiceGroupOrder
  1270.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1271.            Debug-Output "Cannot add NDISWAN to ServiceGroupOrder"
  1272.            goto ShellCodeError
  1273.         endif
  1274. DoNdisWanEnd = +
  1275.     endif 
  1276.     ifstr(i) $(DoRasAsyMac) == TRUE
  1277.         set ThisOption = RASASYMAC
  1278.         set RasSpecificString = $(Product$(ThisOption)Name)
  1279.         ifstr(i) $(fSerialInstalled) == TRUE
  1280.             set AsySoftwareType = "kernelautostart"
  1281.         else-ifstr(i) $(fOtherInstalled) == TRUE
  1282.             set AsySoftwareType = "kernelautostart"
  1283.         else-ifstr(i) $(fUnimodemInstalled) == TRUE
  1284.             set AsySoftwareType = "kernelautostart"
  1285.         else
  1286.             set AsySoftwareType = "kerneldisable"
  1287.         endif
  1288.         Shell $(!UtilityInf), AddSoftwareComponent, $(!Manufacturer), +
  1289.               $(Product$(ThisOption)Name), $(Product$(ThisOption)Name), +
  1290.               $(Product$(ThisOption)DisplayName), +
  1291.               $(!RasInfName), $(Product$(ThisOption)ImagePath), $(AsySoftwareType),+
  1292.               "NDIS", {}, "", $(!RasMsgDll), $(!RasEventTypeSupported)
  1293.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1294.             Debug-Output "AddSoftware bombed out"
  1295.             goto ShellCodeError
  1296.         endif
  1297.         set RegistryErrorIndex = $($R0)
  1298.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1299.             CloseRegKey $($R1)
  1300.             CloseRegKey $($R2)
  1301.             CloseRegKey $($R3)
  1302.             CloseRegKey $($R4)
  1303.             CloseRegKey $($R5)
  1304.             goto fatalregistry
  1305.         endif
  1306.         Set SoftProductKey    = $($R1)
  1307.         Set SoftNetRuleKey    = $($R2)
  1308.         CloseRegKey $($R3)
  1309.         CloseRegKey $($R4)
  1310.         CloseRegKey $($R5)
  1311.         set NewValueList = +
  1312.             {{Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)},+
  1313.              {ServiceName,$(NoTitle),$(!REG_VT_SZ),+
  1314.               $(Product$(ThisOption)Name)},+
  1315.              {SoftwareType,$(NoTitle),$(!REG_VT_SZ),+
  1316.           $(Product$(ThisOption)Type)},+
  1317.              {Title,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Title)},+
  1318.              {Description,$(NoTitle),$(!REG_VT_SZ),+
  1319.               $(Product$(ThisOption)Description)},+
  1320.              {PathName,$(NoTitle),$(!REG_VT_SZ),+
  1321.               $(Product$(ThisOption)ImagePath)},+
  1322.              {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMajorVersion)},+
  1323.              {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMinorVersion)},+
  1324.              {BindControl,$(NoTitle),$(!REG_VT_DWORD),$(HideBindings)},+
  1325.              {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)},+
  1326.              {Hidden,$(NoTitle),$(!REG_VT_DWORD),$(!HideComponent)}}
  1327.         Shell  $(!UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  1328.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1329.             Debug-Output "AddValueList bombed out"
  1330.             goto ShellCodeError
  1331.         endif
  1332.         set RegistryErrorIndex = $($R0)
  1333.         CloseRegKey $(SoftProductKey)
  1334.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1335.             CloseRegKey $(SoftNetRuleKey)
  1336.             goto fatalregistry
  1337.         endif
  1338.         set NewValueList = +
  1339.         {{class, $(NoTitle), $(!REG_VT_MULTI_SZ), $(NetRule$(ThisOption)Class)},+
  1340.              {type,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Type)},+
  1341.              {use,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Use)}, +
  1342.              {bindform,$(NoTitle),$(!REG_VT_SZ),+
  1343.               $(NetRule$(ThisOption)BindForm)}, +
  1344.              {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),+
  1345.               $(!NetRule$(ThisOption)Bindable)}, +
  1346.              {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}, +
  1347.              {Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)}}
  1348.         Shell  $(!UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  1349.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1350.             Debug-Output "AddValueList bombed out"
  1351.             goto ShellCodeError
  1352.         endif
  1353.         set RegistryErrorIndex = $($R0)
  1354.         CloseRegKey $(SoftNetRuleKey)
  1355.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1356.             goto fatalregistry
  1357.         endif
  1358.         Shell $(!UtilityInf), AddHardwareComponent, +
  1359.               $(Product$(ThisOption)Name),$(!RasInfName),+
  1360.               $(Product$(ThisOption)KeyName)
  1361.         ifint $($R4) != -1
  1362.             Set !NETCARD_LIST = >($(!NETCARD_LIST), +
  1363.                                  {$(Product$(ThisOption)Name),+
  1364.                                  $(!NetworkCardKeyName)"\"$($R4)})
  1365.         endif
  1366.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1367.            Debug-Output "Cannot add hardware component"
  1368.            goto ShellCodeError
  1369.         endif
  1370.         set RegistryErrorIndex = $($R0)
  1371.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1372.             Debug-Output "Registry error: add hardware component"
  1373.             CloseRegKey $($R1)
  1374.             CloseRegKey $($R2)
  1375.             CloseRegKey $($R3)
  1376.             goto fatalregistry
  1377.         endif
  1378.         set KeyNetcard    = $($R1)
  1379.         set KeyParameters = $($R3)
  1380.         set KeyAdapterRules = $($R2)
  1381.         set AdapterNumber = $($R4)
  1382.         set NewValueList = +
  1383.             {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(!Manufacturer)},+
  1384.              {Title,$(NoTitle),$(!REG_VT_SZ),+
  1385.               "["$($R4)"] "$(Product$(ThisOption)Title)},+
  1386.              {Description,$(NoTitle),$(!REG_VT_SZ),+
  1387.               $(Product$(ThisOption)Description)},+
  1388.              {ProductName,$(NoTitle),$(!REG_VT_SZ),+
  1389.               $(Product$(ThisOption)Name)},+
  1390.              {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  1391.              {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)},+
  1392.              {Hidden,$(NoTitle),$(!REG_VT_DWORD),$(!HideComponent)}}
  1393.         Shell  $(!UtilityInf), AddValueList, $(KeyNetcard), $(NewValueList)
  1394.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1395.             Debug-Output "ShellCode error"
  1396.             goto ShellCodeError
  1397.         endif
  1398.         CloseRegKey $(KeyNetcard)
  1399.         set TempProdName = """"$(Product$(ThisOption)Name)$(AdapterNumber)""""
  1400.         set TempBindForm = $(TempProdName)$(NetRuleHardware$(ThisOption)BindForm)
  1401.         set NewValueList = +
  1402.             {{type,$(NoTitle),$(!REG_VT_SZ),+
  1403.               $(NetRuleHardware$(ThisOption)Type)},+
  1404.              {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  1405.              {class,$(NoTitle),$(!REG_VT_MULTI_SZ),+
  1406.               $(NetRuleHardware$(ThisOption)Class)}, +
  1407.              {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}, +
  1408.              {Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)}}
  1409.         Shell  $(!UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  1410.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1411.             Debug-Output "ShellCode error."
  1412.             goto ShellCodeError
  1413.         endif
  1414.         set RegistryErrorIndex = $($R0)
  1415.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1416.             Debug-Output "Resgitry error: add value list."
  1417.             CloseRegKey $(KeyParameters)
  1418.             CloseRegKey $(KeyAdapterRules)
  1419.             goto fatalregistry
  1420.         endif
  1421.         CloseRegKey $(KeyAdapterRules)
  1422.         CloseRegKey $(KeyParameters)
  1423.     endif 
  1424.     Shell "" InstallNdisTapiService
  1425.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1426.          Debug-Output "Error shelling InstallNdisTapiService "
  1427.          goto ShellCodeError
  1428.     endif
  1429.     ifstr(i) $($R0) != STATUS_SUCCESSFUL
  1430.          set RegistryErrorIndex = $($R0)
  1431.          Debug-Output "Error installing NdisTapi Service"
  1432.          goto fatalregistry
  1433.     endif
  1434.     goto WriteParameters
  1435. WriteParameters = +
  1436.     ifstr(i) $(DoAdminOnly) == TRUE
  1437.         goto WriteParametersOver
  1438.     endif
  1439.     StartWait
  1440.     read-syms StatusUpdatingRegistry$(!STF_LANGUAGE)
  1441.     shell $(subroutninf) PushBillBoard NETSTATUSDLG $(WritingRasParams)
  1442.     Set BillboardVisible = 1
  1443.     Debug-Output "Writing Registry Parameters."
  1444.     ifstr(i) $(DoServer) != TRUE
  1445.         goto WriteRasMan
  1446.     endif
  1447.     Debug-Output "OEMNSVRA.INF: Product type "$(!STF_PRODUCT)
  1448.     Debug-Output "OEMNSVRA.INF: Total dialin ports "$(NewNumDialin)
  1449.     set RasStartValue = 3
  1450.     ifstr(i) $(!STF_PRODUCT) != "WINNT"
  1451.         ifint $(NewNumDialin) != 0
  1452.             set RasStartValue = 2
  1453.         endif
  1454.     endif
  1455.     set KeySvr = $(KeyNull)
  1456.     OpenRegKey $(!REG_H_LOCAL) "" $(RasSvrKeyName) $(!MAXIMUM_ALLOWED) KeySvr
  1457.     ifstr $(KeySvr) == $(KeyNull)
  1458.         Debug-Output "OEMNSVRA.INF: could not open RemoteAccess key"
  1459.     else
  1460.         ifstr(i) $(!NTN_InstallMode) != install
  1461.             GetRegValue $(KeySvr) "Start" StartList
  1462.             ifint $(RegLastError) == 0
  1463.                 set RasStartValue = *($(StartList), 4)
  1464.             endif
  1465.         endif
  1466.         ifint $(NewNumDialin) == 0
  1467.             ifint $(RasStartValue) != 4
  1468.                 set RasStartValue = 3
  1469.             endif
  1470.         endif
  1471.         Debug-Output "OEMNSVRA.INF: Setting RemoteAccess start type to "$(RasStartValue)
  1472.         SetRegValue $(KeySvr) {Start,$(NoTitle),$(!REG_VT_DWORD),$(RasStartValue)}
  1473.         CloseRegKey $(KeySvr)
  1474.     endif
  1475.     OpenRegKey $(!REG_H_LOCAL) "" $(RasSvrParamKeyName) $(!MAXIMUM_ALLOWED) KeySrvParams
  1476.     ifstr $(KeySrvParams) == $(KeyNull)
  1477.        Debug-Output "OEMNSVRA.INF: could not open RasSvr Params key"
  1478.        set RegistryErrorIndex = UNABLE_OPEN_SERVICE_PARAMETERS
  1479.        goto fatalregistry
  1480.     endif
  1481.     set NewValueList = +
  1482.         {{NetBiosGatewayEnabled, $(NoTitle), $(!REG_VT_DWORD), $(NetBiosGtwyEnabled)}}
  1483.     Shell  $(!UtilityInf), AddValueList, $(KeySrvParams), $(NewValueList)
  1484.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1485.          Debug-Output "AddValueList bombed out"
  1486.          goto ShellCodeError
  1487.     endif
  1488.     set RegistryErrorIndex = $($R0)
  1489.     Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1490.         goto fatalregistry
  1491.     endif
  1492.     CloseRegKey $(KeySrvParams)
  1493. WriteRasMan = +
  1494.     OpenRegKey $(!REG_H_LOCAL) "" $(RasManParamKeyName) $(!MAXIMUM_ALLOWED) KeyRasManParams
  1495.     ifstr $(KeyRasManParams) == $(KeyNull)
  1496.        Debug-Output "OEMNSVRA.INF: could not open RasMan Params key"
  1497.        set RegistryErrorIndex = UNABLE_OPEN_SERVICE_PARAMETERS
  1498.        goto fatalregistry
  1499.     endif
  1500.     set MediaValue = {"rastapi"}
  1501.     ifstr(i) $(fSerialInstalled) == TRUE
  1502.         set MediaValue = >($(MediaValue), "rasser")
  1503.     endif
  1504.     set OtherConfigKey = $(!NTN_SoftwareBase)"\"$(!Manufacturer)"\"$(ProductRASName)"\OTHER DEVICES\CONFIGURED"
  1505.     set KeyOtherMedia = $(KeyNull)
  1506.     OpenRegKey $(!REG_H_LOCAL) "" $(OtherConfigKey) $(!MAXIMUM_ALLOWED)  +
  1507.                KeyOtherMedia
  1508.     ifstr $(KeyOtherMedia) != $(KeyNull)
  1509.         EnumRegKey $(KeyOtherMedia) OtherList
  1510.         Debug-Output "oemnsvra.inf: Other Media list "$(OtherList)
  1511.         ForListDo $(OtherList)
  1512.             set MediaName = *($($),1)
  1513.             set KeyMedia = $(KeyNull)
  1514.             OpenRegKey $(KeyOtherMedia) "" $(MediaName) $(!MAXIMUM_ALLOWED)  +
  1515.                        KeyMedia
  1516.             ifstr $(KeyMedia) != $(KeyNull)
  1517.                 GetRegValue $(KeyMedia), "MediaType" MediaType
  1518.                 Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  1519.                     set MediaTypeValue = *($(MediaType),4)
  1520.                     set MediaValue = >($(MediaValue), $(MediaTypeValue))
  1521.                 endif
  1522.                 CloseRegKey $(KeyMedia)
  1523.             endif
  1524.         EndForListDo
  1525.         CloseRegKey $(KeyOtherMedia)
  1526.     else
  1527.         Debug-Output "oemnsvra.inf: Other Media not configured"
  1528.     endif
  1529.     Debug-Output "Adding Medias as "$(MediaValue)
  1530.     set NewValueList = {{Medias,$(NoTitle),$(!REG_VT_MULTI_SZ),$(MediaValue)}}
  1531.     Shell  $(!UtilityInf), AddValueList, $(KeyRasManParams), $(NewValueList)
  1532.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1533.          Debug-Output "AddValueList bombed out"
  1534.          goto ShellCodeError
  1535.     endif
  1536.     set RegistryErrorIndex = $($R0)
  1537.     Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1538.         goto fatalregistry
  1539.     endif
  1540.     CloseRegKey $(KeyRasManParams)
  1541. WriteNdisWan = +
  1542.     set PrevNumPorts = 0
  1543.     set PrevNumDialin = 0
  1544.     set PrevNumDialout = 0
  1545.     OpenRegKey $(!REG_H_LOCAL) "" $(RasAsyMacParamKeyName) $(!MAXIMUM_ALLOWED) KeyMacParams
  1546.     ifstr $(KeyMacParams) == $(KeyNull)
  1547.        ifstr(i) $(!NTN_InstallMode) == configure
  1548.           Debug-Output "OEMNSVRA.INF: could not open AsyncMac Params key"
  1549.           set RegistryErrorIndex = UNABLE_OPEN_SERVICE_PARAMETERS
  1550.           goto fatalregistry
  1551.        endif
  1552.        goto WriteNdisWan1
  1553.     endif
  1554.     GetRegValue $(KeyMacParams), "Ports" PortsInfo
  1555.     GetRegValue $(KeyMacParams), "DialinNBF" DialinNBFInfo
  1556.     GetRegValue $(KeyMacParams), "DialoutNBF" DialoutNBFInfo
  1557.     GetRegValue $(KeyMacParams), "DialinIP" DialinIPInfo
  1558.     GetRegValue $(KeyMacParams), "DialoutIP" DialoutIPInfo
  1559.     GetRegValue $(KeyMacParams), "DialinoutIPX" DialinoutIPXInfo
  1560.     set PrevNumPorts         = *($(PortsInfo), 4)
  1561.     set PrevNumDialinNBF     = *($(DialinNBFInfo), 4)
  1562.     set PrevNumDialoutNBF    = *($(DialoutNBFInfo), 4)
  1563.     set PrevNumDialinIP      = *($(DialinIPInfo), 4)
  1564.     set PrevNumDialoutIP     = *($(DialoutIPInfo), 4)
  1565.     set PrevNumDialinoutIPX  = *($(DialinoutIPXInfo), 4)
  1566.     Debug-Output "Ports currently configured "$(PrevNumPorts)
  1567.     Debug-Output "Ports currently dialin NBF "$(PrevNumDialinNBF)
  1568.     Debug-Output "Ports currently dialout NBF "$(PrevNumDialoutNBF)
  1569.     Debug-Output "Ports currently dialin IP "$(PrevNumDialinIP)
  1570.     Debug-Output "Ports currently diaout IP "$(PrevNumDialoutIP)
  1571.     Debug-Output "Ports currently diainout IPX "$(PrevNumDialinoutIPX)
  1572.     CloseRegKey $(KeyMacParams)
  1573. WriteNdisWan1 =+
  1574.     set ThisOption = NDISWAN
  1575.     set RasSpecificString = $(!Product$(ThisOption)Name)
  1576.     OpenRegKey $(!REG_H_LOCAL) "" $(NdisWanParamKeyName) $(!MAXIMUM_ALLOWED) KeyHubParams
  1577.     ifstr $(KeyHubParams) == $(KeyNull)
  1578.        Debug-Output "OEMNSVRA.INF: could not open NdisWan Params key"
  1579.        set RegistryErrorIndex = UNABLE_OPEN_SERVICE_PARAMETERS
  1580.        goto fatalregistry
  1581.     endif
  1582.     set NewValueList = +
  1583.         {{EndPoints, $(NoTitle), $(!REG_VT_MULTI_SZ), $(NewNumPortsList)}}
  1584.     Shell  $(!UtilityInf), AddValueList, $(KeyHubParams), $(NewValueList)
  1585.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1586.          Debug-Output "AddValueList bombed out"
  1587.          goto ShellCodeError
  1588.     endif
  1589.     set RegistryErrorIndex = $($R0)
  1590.     CloseRegKey $(KeyHubParams)
  1591.     Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1592.         goto fatalregistry
  1593.     endif
  1594.     ifint $(PrevNumDialinNBF) == $(NewNumDialinNBF)
  1595.       ifint $(PrevNumDialoutNBF) == $(NewNumDialoutNBF)
  1596.         ifint $(PrevNumDialinIP) == $(NewNumDialinIP)
  1597.           ifint $(PrevNumDialoutIP) == $(NewNumDialoutIP)
  1598.             ifint $(PrevNumDialinoutIPX) == $(NewNumDialinoutIPX)
  1599.               set CommonStatus = STATUS_USERCANCEL
  1600.               goto WriteRasAsyMac
  1601.             endif
  1602.           endif
  1603.         endif
  1604.       endif
  1605.     endif
  1606.     set NumAddDialinNBF      = 0
  1607.     set NumAddDialoutNBF     = 0
  1608.     set NumRemoveDialinNBF   = 0
  1609.     set NumRemoveDialoutNBF  = 0
  1610.     set NumAddDialinIP       = 0
  1611.     set NumAddDialoutIP      = 0
  1612.     set NumRemoveDialinIP    = 0
  1613.     set NumRemoveDialoutIP   = 0
  1614.     ifint $(PrevNumDialinNBF) > $(NewNumDialinNBF)
  1615.         set-sub NumRemoveDialinNBF = $(PrevNumDialinNBF), $(NewNumDialinNBF)
  1616.     else
  1617.         set-sub NumAddDialinNBF = $(NewNumDialinNBF), $(PrevNumDialinNBF)
  1618.     endif
  1619.     ifint $(PrevNumDialoutNBF) > $(NewNumDialoutNBF)
  1620.         set-sub NumRemoveDialoutNBF = $(PrevNumDialoutNBF), $(NewNumDialoutNBF)
  1621.     else
  1622.         set-sub NumAddDialoutNBF = $(NewNumDialoutNBF), $(PrevNumDialoutNBF)
  1623.     endif
  1624.     ifint $(PrevNumDialinIP) > $(NewNumDialinIP)
  1625.         set-sub NumRemoveDialinIP = $(PrevNumDialinIP), $(NewNumDialinIP)
  1626.     else
  1627.         set-sub NumAddDialinIP = $(NewNumDialinIP), $(PrevNumDialinIP)
  1628.     endif
  1629.     ifint $(PrevNumDialoutIP) > $(NewNumDialoutIP)
  1630.         set-sub NumRemoveDialoutIP = $(PrevNumDialoutIP), $(NewNumDialoutIP)
  1631.     else
  1632.         set-sub NumAddDialoutIP = $(NewNumDialoutIP), $(PrevNumDialoutIP)
  1633.     endif
  1634.     ifint $(PrevNumDialinoutIPX) > $(NewNumDialinoutIPX)
  1635.         set-sub NumRemoveDialinoutIPX = $(PrevNumDialinoutIPX), $(NewNumDialinoutIPX)
  1636.     else
  1637.         set-sub NumAddDialinoutIPX = $(NewNumDialinoutIPX), $(PrevNumDialinoutIPX)
  1638.     endif
  1639.     set NumAddTotal = 0
  1640.     set NumRemoveTotal = 0
  1641.     set-add NumAddTotal = $(NumAddDialinNBF), $(NumAddDialoutNBF)
  1642.     set-add NumAddTotal = $(NumAddTotal), $(NumAddDialinIP)
  1643.     set-add NumAddTotal = $(NumAddTotal), $(NumAddDialoutIP)
  1644.     set-add NumAddTotal = $(NumAddTotal), $(NumAddDialinoutIPX)
  1645.     set-add NumRemoveTotal = $(NumRemoveDialinNBF), $(NumRemoveDialoutNBF)
  1646.     set-add NumRemoveTotal = $(NumRemoveTotal), $(NumRemoveDialinIP)
  1647.     set-add NumRemoveTotal = $(NumRemoveTotal), $(NumRemoveDialoutIP)
  1648.     set-add NumRemoveTotal = $(NumRemoveTotal), $(NumRemoveDialinoutIPX)
  1649.     Debug-Output "NumAddDialinNBF = "$(NumAddDialinNBF)
  1650.     Debug-Output "NumAddDialoutNBF = "$(NumAddDialoutNBF)
  1651.     Debug-Output "NumAddDialinIP = "$(NumAddDialinIP)
  1652.     Debug-Output "NumAddDialoutIP = "$(NumAddDialoutIP)
  1653.     Debug-Output "NumAddDialinoutIPX = "$(NumAddDialinoutIPX)
  1654.     Debug-Output "NumAddTotal = "$(NumAddTotal)
  1655.     Debug-Output "NumRemoveDialinNBF = "$(NumRemoveDialinNBF)
  1656.     Debug-Output "NumRemoveDialinIP = "$(NumRemoveDialinIP)
  1657.     Debug-Output "NumRemoveDialinoutIPX = "$(NumRemoveDialinoutIPX)
  1658.     Debug-Output "NumRemoveTotal = "$(NumRemoveTotal)
  1659.     Shell "utility.inf" BaseServiceKey
  1660.     set RegistryErrorIndex = $($R0)
  1661.     Ifstr(i) $(RegistryErrorIndex) == NO_ERROR
  1662.         Debug-Output "OEMNSVRA.INF: Opened the services base key"
  1663.         set ServicesBaseKey = $($R1)
  1664.     else
  1665.         set ServicesBaseKey = $(KeyNull)
  1666.     endif
  1667.     OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) $(MAXIMUM_ALLOWED) KeyNetcards
  1668.     Ifstr(i) $(RegistryErrorIndex) == NO_ERROR
  1669.         Debug-Output "OEMNSVRA.INF: Opened the networkcardkey "
  1670.     endif
  1671.     set RasAdapterNumber = 1
  1672. AddNdisWanNetCard = +
  1673.      IfInt $(NumAddTotal) == 0
  1674.       goto RemoveNdisWanNetCard
  1675.      else
  1676.           Debug-Output "In the Add if loop. NumAddTotal = "$(NumAddTotal)
  1677.           shell $(subroutninf) PushBillBoard NETSTATUSDLG +
  1678.                                       $(WritingRasParamsAdd)" "$(NumAddTotal)
  1679.           set-sub NumAddTotal = $(NumAddTotal),1
  1680.           Shell $(!UtilityInf), AddHardwareComponent, +
  1681.                $(!Product$(ThisOption)Name),$(!RasInfName),+
  1682.                $(!Product$(ThisOption)KeyName), +
  1683.                $(ServicesBaseKey), $(KeyNetcards), $(RasAdapterNumber)
  1684.           ifint $($R4) != -1
  1685.              Set !NETCARD_LIST = >($(!NETCARD_LIST), +
  1686.                                   {$(!Product$(ThisOption)Name),+
  1687.                                   $(!NetworkCardKeyName)"\"$($R4)})
  1688.              set RasAdapterNumber = $($R4)
  1689.           endif
  1690.           ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1691.              Debug-Output "Cannot add hardware component"
  1692.              goto ShellCodeError
  1693.           endif
  1694.           set RegistryErrorIndex = $($R0)
  1695.           Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1696.               Debug-Output "Registry error: add hardware component"
  1697.               CloseRegKey $($R1)
  1698.               CloseRegKey $($R2)
  1699.               CloseRegKey $($R3)
  1700.               goto fatalregistry
  1701.           endif
  1702.         set KeyNetcard    = $($R1)
  1703.         set KeyParameters = $($R3)
  1704.         set KeyAdapterRules = $($R2)
  1705.         set AdapterNumber = $($R4)
  1706.         set NetcardInfoList = +
  1707.             {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(!Manufacturer)},+
  1708.              {Title,$(NoTitle),$(!REG_VT_SZ),+
  1709.               "["$($R4)"] "$(!Product$(ThisOption)Title)},+
  1710.              {Description,$(NoTitle),$(!REG_VT_SZ),+
  1711.               $(!Product$(ThisOption)Description)},+
  1712.              {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  1713.              {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)},+
  1714.              {Hidden,$(NoTitle),$(!REG_VT_DWORD),$(!HideComponent)}}
  1715.         Shell $(!UtilityInf), GetBusTypeNum
  1716.         set BusTypeNum = $($R1)
  1717.         ifint $(NumAddDialinNBF) > 0
  1718.             set-sub NumAddDialinNBF = $(NumAddDialinNBF), 1
  1719.             set NetcardInfoList = >($(NetcardInfoList), +
  1720.                                    {ProductName,$(NoTitle),$(!REG_VT_SZ),+
  1721.                                     $(!Product$(ThisOption)DIALINName)})
  1722.             set ServiceParamList = +
  1723.                         {{EnumExportPref,$(NoTitle),$(!REG_VT_DWORD),0},+
  1724.                         {BusType, $(NoTitle), $(!REG_VT_DWORD), $(BusTypeNum)}}
  1725.             set AdapterType = $(!NetRuleHardwareDIALINType)
  1726.             set AdapterClass = $(!NetRuleHardwareDIALINClass)
  1727.             set AdapterBlock = $(!NetRuleHardwareDIALINBlock)
  1728.         else-ifint $(NumAddDialoutNBF) > 0
  1729.             set-sub NumAddDialoutNBF = $(NumAddDialoutNBF), 1
  1730.             set NetcardInfoList = >($(NetcardInfoList), +
  1731.                                  {ProductName,$(NoTitle),$(!REG_VT_SZ),+
  1732.                                   $(!Product$(ThisOption)DIALOUTName)})
  1733.             set ServiceParamList = +
  1734.                          {{EnumExportPref,$(NoTitle),$(!REG_VT_DWORD),1},+
  1735.                          {BusType, $(NoTitle), $(!REG_VT_DWORD), $(BusTypeNum)}}
  1736.             set AdapterType = $(!NetRuleHardwareDIALOUTType)
  1737.             set AdapterClass = $(!NetRuleHardwareDIALOUTClass)
  1738.             set AdapterBlock = $(!NetRuleHardwareDIALOUTBlock)
  1739.         else-ifint $(NumAddDialinIP) > 0
  1740.             set-sub NumAddDialinIP = $(NumAddDialinIP), 1
  1741.             set NetcardInfoList = >($(NetcardInfoList), +
  1742.                                  {ProductName,$(NoTitle),$(!REG_VT_SZ),+
  1743.                                   $(!Product$(ThisOption)DIALINIPName)})
  1744.             set ServiceParamList = +
  1745.                          {{EnumExportPref,$(NoTitle),$(!REG_VT_DWORD),0},+
  1746.                          {AutoIPAddress,$(NoTitle),$(!REG_VT_DWORD),1},+
  1747.                          {ServerAdapter,$(NoTitle),$(!REG_VT_DWORD),1},+
  1748.                          {BusType, $(NoTitle), $(!REG_VT_DWORD), $(BusTypeNum)}}
  1749.             set AdapterType = $(!NetRuleHardwareDIALINIPType)
  1750.             set AdapterClass = $(!NetRuleHardwareDIALINIPClass)
  1751.             set AdapterBlock = $(!NetRuleHardwareDIALINIPBlock)
  1752.         else-ifint $(NumAddDialoutIP) > 0
  1753.             set-sub NumAddDialoutIP = $(NumAddDialoutIP), 1
  1754.             set NetcardInfoList = >($(NetcardInfoList), +
  1755.                                  {ProductName,$(NoTitle),$(!REG_VT_SZ),+
  1756.                                   $(!Product$(ThisOption)DIALOUTIPName)})
  1757.             set ServiceParamList = +
  1758.                        {{EnumExportPref,$(NoTitle),$(!REG_VT_DWORD),1},+
  1759.                        {AutoIPAddress,$(NoTitle),$(!REG_VT_DWORD),1},+
  1760.                        {ServerAdapter,$(NoTitle),$(!REG_VT_DWORD),0},+
  1761.                        {BusType, $(NoTitle), $(!REG_VT_DWORD), $(BusTypeNum)}}
  1762.             set AdapterType = $(!NetRuleHardwareDIALOUTIPType)
  1763.             set AdapterClass = $(!NetRuleHardwareDIALOUTIPClass)
  1764.             set AdapterBlock = $(!NetRuleHardwareDIALOUTIPBlock)
  1765.         else-ifint $(NumAddDialinoutIPX) > 0
  1766.             set-sub NumAddDialinoutIPX = $(NumAddDialinoutIPX), 1
  1767.             set NetcardInfoList = >($(NetcardInfoList), +
  1768.                                  {ProductName,$(NoTitle),$(!REG_VT_SZ),+
  1769.                                   $(!Product$(ThisOption)DIALINOUTIPXName)})
  1770.             set ServiceParamList = +
  1771.                          {{EnumExportPref,$(NoTitle),$(!REG_VT_DWORD),0},+
  1772.                          {BusType, $(NoTitle), $(!REG_VT_DWORD), $(BusTypeNum)}}
  1773.             set AdapterType = $(!NetRuleHardwareDIALINOUTIPXType)
  1774.             set AdapterClass = $(!NetRuleHardwareDIALINOUTIPXClass)
  1775.             set AdapterBlock = $(!NetRuleHardwareDIALINOUTIPXBlock)
  1776.         endif
  1777.         Shell  $(!UtilityInf), AddValueList, $(KeyNetcard), $(NetcardInfoList)
  1778.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1779.             Debug-Output "ShellCode error"
  1780.             goto ShellCodeError
  1781.         endif
  1782.         CloseRegKey $(KeyNetcard)
  1783.         set TempProdName = """"$(!Product$(ThisOption)Name)$(AdapterNumber)""""
  1784.         set TempBindForm = $(TempProdName)$(!NetRuleHardware$(ThisOption)BindForm)
  1785.         set AdapterRulesList = +
  1786.             {{type,$(NoTitle),$(!REG_VT_SZ),+
  1787.               $(AdapterType)},+
  1788.              {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)},+
  1789.              {class,$(NoTitle),$(!REG_VT_MULTI_SZ),+
  1790.               $(AdapterClass)},+
  1791.              {block,$(NoTitle),$(!REG_VT_MULTI_SZ),+
  1792.               $(AdapterBlock)},+
  1793.              {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)},+
  1794.              {Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)}}
  1795.         Shell  $(!UtilityInf), AddValueList, $(KeyAdapterRules), $(AdapterRulesList)
  1796.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1797.             Debug-Output "ShellCode error."
  1798.             goto ShellCodeError
  1799.         endif
  1800.         set RegistryErrorIndex = $($R0)
  1801.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1802.             Debug-Output "Resgitry error: add value list."
  1803.             CloseRegKey $(KeyParameters)
  1804.             CloseRegKey $(KeyAdapterRules)
  1805.             goto fatalregistry
  1806.         endif
  1807.         CloseRegKey $(KeyAdapterRules)
  1808.         Shell  $(!UtilityInf), AddValueList, $(KeyParameters), $(ServiceParamList)
  1809.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1810.             Debug-Output "ShellCode error."
  1811.             goto ShellCodeError
  1812.         endif
  1813.         CloseRegKey $(KeyParameters)
  1814.     goto AddNdisWanNetCard
  1815.      endif 
  1816. RemoveNdisWanNetCard = +
  1817.      ifstr(i) $(ServicesBaseKey) != $(KeyNull)
  1818.          CloseRegKey $(ServicesBaseKey)
  1819.      endif
  1820.      ifstr(i) $(KeyNetcards) != $(KeyNull)
  1821.          CloseRegKey $(KeyNetcards)
  1822.      endif
  1823.      Ifint $(NumRemoveTotal) == 0
  1824.      goto WriteRasAsyMac
  1825.      endif
  1826.      Debug-Output "Removing NdisWan netcard entry..."
  1827.         OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) $(!MAXIMUM_ALLOWED) KeyNetcards
  1828.         ifstr $(KeyNetcards) == $(KeyNull)
  1829.              Debug-Output "OEMNSVRA.INF: could not open Netcards key"
  1830.              set RegistryErrorIndex = UNABLE_OPEN_NETWORKCARD_SECTION
  1831.              goto fatalregistry
  1832.         endif
  1833.         EnumRegKey $(KeyNetcards) NetcardsList
  1834.         set RemoveDialinList  = {}
  1835.         set RemoveDialinIpList  = {}
  1836.         set RemoveDialoutList = {}
  1837.         set RemoveDialoutIpList = {}
  1838.         set RemoveDialinoutIpxList = {}
  1839.         ForListDo $(NetcardsList)
  1840.            set KeyName = *($($),1)
  1841.            OpenRegKey $(KeyNetcards) "" $(KeyName) $(!MAXIMUM_ALLOWED) Card
  1842.            ifstr $(Card) == $(KeyNull)
  1843.                Debug-Output "OEMNSVRA.INF: could not open netcard key"
  1844.                set RegistryErrorIndex = UNABLE_OPEN_NETWORKCARD_SECTION
  1845.                goto fatalregistry
  1846.            endif
  1847.            GetRegValue $(Card), "ProductName" ProductNameInfo
  1848.            set CardProductName = *($(ProductNameInfo), 4)
  1849.            ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINName)
  1850.               set RemoveDialinList = >($(RemoveDialinList), +
  1851.                       {$(!ProductNDISWANName),+
  1852.                                        $(!NetworkCardKeyName)"\"$(KeyName)})
  1853.            else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINIPName)
  1854.               set RemoveDialinIpList = >($(RemoveDialinIpList), +
  1855.                     {$(!ProductNDISWANName),+
  1856.                                          $(!NetworkCardKeyName)"\"$(KeyName)})
  1857.            else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALOUTName)
  1858.               set RemoveDialoutList = >($(RemoveDialoutList), +
  1859.                        {$(!ProductNDISWANName),+
  1860.                                         $(!NetworkCardKeyName)"\"$(KeyName)})
  1861.            else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALOUTIPName)
  1862.               set RemoveDialoutIpList = >($(RemoveDialoutIpList), +
  1863.                      {$(!ProductNDISWANName),+
  1864.                                           $(!NetworkCardKeyName)"\"$(KeyName)})
  1865.            else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINOUTIPXName)
  1866.               set RemoveDialinoutIpxList = >($(RemoveDialinoutIpxList), +
  1867.                        {$(!ProductNDISWANName),+
  1868.                                            $(!NetworkCardKeyName)"\"$(KeyName)})
  1869.            endif
  1870.            CloseRegKey $(Card)
  1871.         EndForListDo
  1872.         CloseRegKey $(KeyNetcards)
  1873.         QueryListSize IpNetCards $(RemoveDialinIpList)
  1874.         ifint $(IpNetCards) != 0
  1875.             ForListDo  $(RemoveDialinIpList)
  1876.                 ifint $(NumRemoveDialinIP) == 0
  1877.                     goto RemoveDialinIPX
  1878.                 endif
  1879.                 set-sub NumRemoveDialinIP = $(NumRemoveDialinIP), 1
  1880.                 shell $(subroutninf) PushBillBoard NETSTATUSDLG +
  1881.                                       $(WritingRasParamsRemove)" "$(NumRemoveTotal)
  1882.                 set-sub NumRemoveTotal = $(NumRemoveTotal), 1
  1883.                 debug-output "Removing hardware component: "$($)
  1884.                 Shell $(!UtilityInf), RemoveHardwareComponent, +
  1885.                                      $(!Manufacturer), *($($),1), *($($),2)
  1886.             EndForListDo
  1887.         endif
  1888. RemoveDialinIPX =+
  1889.         QueryListSize IpxNetCards $(RemoveDialinoutIpxList)
  1890.         ifint $(IpxNetCards) != 0
  1891.             ForListDo  $(RemoveDialinoutIpxList)
  1892.                 ifint $(NumRemoveDialinoutIPX) == 0
  1893.                     goto RemoveDialinNBF
  1894.                 endif
  1895.                 set-sub NumRemoveDialinoutIPX = $(NumRemoveDialinoutIPX), 1
  1896.                 debug-output "Removing hardware component: "$($)
  1897.                 shell $(subroutninf) PushBillBoard NETSTATUSDLG +
  1898.                                       $(WritingRasParamsRemove)" "$(NumRemoveTotal)
  1899.                 set-sub NumRemoveTotal = $(NumRemoveTotal), 1
  1900.                 Shell $(!UtilityInf), RemoveHardwareComponent, +
  1901.                                      $(!Manufacturer), *($($),1), *($($),2)
  1902.             EndForListDo
  1903.         endif
  1904. RemoveDialinNBF =+
  1905.         ForListDo  $(RemoveDialinList)
  1906.             ifint $(NumRemoveDialinNBF) == 0
  1907.                 goto RemoveDialout
  1908.             endif
  1909.             set-sub NumRemoveDialinNBF = $(NumRemoveDialinNBF), 1
  1910.             shell $(subroutninf) PushBillBoard NETSTATUSDLG +
  1911.                                   $(WritingRasParamsRemove)" "$(NumRemoveTotal)
  1912.             set-sub NumRemoveTotal = $(NumRemoveTotal), 1
  1913.             debug-output "Removing hardware component: "$($)
  1914.             Shell $(!UtilityInf), RemoveHardwareComponent, $(!Manufacturer),+
  1915.                   *($($),1), *($($),2)
  1916.         EndForListDo
  1917. RemoveDialout = +
  1918.         QueryListSize IpNetCards $(RemoveDialoutIpList)
  1919.         ifint $(IpNetCards) != 0
  1920.             ForListDo  $(RemoveDialoutIpList)
  1921.                 ifint $(NumRemoveDialoutIP) == 0
  1922.                     goto RemoveDialoutNBF
  1923.                 endif
  1924.                 set-sub NumRemoveDialoutIP = $(NumRemoveDialoutIP), 1
  1925.                 shell $(subroutninf) PushBillBoard NETSTATUSDLG +
  1926.                                       $(WritingRasParamsRemove)" "$(NumRemoveTotal)
  1927.                 set-sub NumRemoveTotal = $(NumRemoveTotal), 1
  1928.                 debug-output "Removing hardware component: "$($)
  1929.                 Shell $(!UtilityInf), RemoveHardwareComponent, +
  1930.                                      $(!Manufacturer), *($($),1), *($($),2)
  1931.             EndForListDo
  1932.         endif
  1933. RemoveDialoutNBF =+
  1934.         ForListDo  $(RemoveDialoutList)
  1935.             ifint $(NumRemoveDialoutNBF) == 0
  1936.         goto WriteRasAsyMac
  1937.             endif
  1938.             set-sub NumRemoveDialoutNBF = $(NumRemoveDialoutNBF), 1
  1939.             shell $(subroutninf) PushBillBoard NETSTATUSDLG +
  1940.                                   $(WritingRasParamsRemove)" "$(NumRemoveTotal)
  1941.             set-sub NumRemoveTotal = $(NumRemoveTotal), 1
  1942.             debug-output "Removing hardware component: "$($)
  1943.             Shell $(!UtilityInf), RemoveHardwareComponent, $(!Manufacturer),+
  1944.                   *($($),1), *($($),2)
  1945.         EndForListDo
  1946. WriteRasAsyMac = +
  1947.     ifstr(i) $(fSerialInstalled) == TRUE
  1948.         set AsyStartValue = 2
  1949.     else-ifstr(i) $(fOtherInstalled) == TRUE
  1950.         set AsyStartValue = 2
  1951.     else-ifstr(i) $(fUnimodemInstalled) == TRUE
  1952.         set AsyStartValue = 2
  1953.     else
  1954.         set AsyStartValue = 4
  1955.     endif
  1956.     OpenRegKey $(!REG_H_LOCAL) "" $(RasAsyMacKeyName) $(!MAXIMUM_ALLOWED) KeyMac
  1957.     ifstr $(KeyMac) == $(KeyNull)
  1958.         Debug-Output "OEMNSVRA.INF: could not open AsyncMac key"
  1959.     else
  1960.         SetRegValue $(KeyMac) {Start,$(NoTitle),$(!REG_VT_DWORD),$(AsyStartValue)}
  1961.         CloseRegKey $(KeyMac)
  1962.     endif
  1963.     ifint $(PrevNumPorts) == $(NewNumPorts)
  1964.       ifint $(PrevNumDialinNBF) == $(NewNumDialinNBF)
  1965.         ifint $(PrevNumDialoutNBF) == $(NewNumDialoutNBF)
  1966.           ifint $(PrevNumDialinIP) == $(NewNumDialinIP)
  1967.             ifint $(PrevNumDialoutIP) == $(NewNumDialoutIP)
  1968.               ifint $(PrevNumDialinoutIPX) == $(NewNumDialinoutIPX)
  1969.                   EndWait
  1970.                   Ifint $(BillboardVisible) != 0
  1971.                       Shell "subroutn.inf" PopBillboard
  1972.                       Set BillboardVisible = 0
  1973.                   Endif
  1974.                   goto WriteProtocolInfo
  1975.               endif
  1976.             endif
  1977.           endif
  1978.         endif
  1979.       endif
  1980.     endif
  1981.     OpenRegKey $(!REG_H_LOCAL) "" $(RasAsyMacParamKeyName) $(!MAXIMUM_ALLOWED) KeyMacParams
  1982.     ifstr $(KeyMacParams) == $(KeyNull)
  1983.        Debug-Output "OEMNSVRA.INF: could not open AsyncMac Params key"
  1984.        set RegistryErrorIndex = UNABLE_OPEN_SERVICE_PARAMETERS
  1985.        goto fatalregistry
  1986.     endif
  1987.     set NewValueList = +
  1988.         {{Ports, $(NoTitle), $(!REG_VT_DWORD), $(NewNumPorts)},+
  1989.          {DialinNBF, $(NoTitle), $(!REG_VT_DWORD), $(NewNumDialinNBF)},+
  1990.          {DialoutNBF, $(NoTitle), $(!REG_VT_DWORD), $(NewNumDialoutNBF)},+
  1991.          {DialinIP, $(NoTitle), $(!REG_VT_DWORD), $(NewNumDialinIP)},+
  1992.          {DialoutIP, $(NoTitle), $(!REG_VT_DWORD), $(NewNumDialoutIP)},+
  1993.          {DialinoutIPX, $(NoTitle), $(!REG_VT_DWORD), $(NewNumDialinoutIPX)}}
  1994.     Shell  $(!UtilityInf), AddValueList, $(KeyMacParams), $(NewValueList)
  1995.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1996.          Debug-Output "AddValueList bombed out"
  1997.          goto ShellCodeError
  1998.     endif
  1999.     set RegistryErrorIndex = $($R0)
  2000.     CloseRegKey $(KeyMacParams)
  2001.     Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  2002.         goto fatalregistry
  2003.     endif
  2004.     OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) $(!MAXIMUM_ALLOWED) KeyNetcards
  2005.     ifstr $(KeyNetcards) == $(KeyNull)
  2006.          Debug-Output "OEMNSVRA.INF: could not open Netcards key"
  2007.          set RegistryErrorIndex = UNABLE_OPEN_NETWORKCARD_SECTION
  2008.          goto fatalregistry
  2009.     endif
  2010.     EnumRegKey $(KeyNetcards) NetcardsList
  2011.     ForListDo $(NetcardsList)
  2012.        set KeyName = *($($),1)
  2013.        OpenRegKey $(KeyNetcards) "" $(KeyName) $(!MAXIMUM_ALLOWED) Card
  2014.        ifstr $(Card) == $(KeyNull)
  2015.           Debug-Output "OEMNSVRA.INF: could not open netcard key"
  2016.           set RegistryErrorIndex = UNABLE_OPEN_NETWORKCARD_SECTION
  2017.           goto fatalregistry
  2018.        endif
  2019.        GetRegValue $(Card), "ProductName" ProductNameInfo
  2020.        set CardProductName = *($(ProductNameInfo), 4)
  2021.        ifstr(i) $(CardProductName) == $(ProductRASASYMACName)
  2022.            goto RasMacCardFound
  2023.        endif
  2024.        CloseRegKey $(Card)
  2025.     EndForListDo
  2026.     CloseRegKey $(KeyNetcards)
  2027. RasMacCardFound = +
  2028.     Debug-Output "Shelling to find AsyncMac Service."
  2029.     Shell $(!UtilityInf) FindService, $(Card)
  2030.     CloseRegKey $(Card)
  2031.     ifint $($ShellCode)  != $(!SHELL_CODE_OK)
  2032.         Debug-Output "OEMNSVRA.INF: shell Findservice failed"
  2033.         goto ShellCodeError
  2034.     endif
  2035.     ifstr(i) $($R0) != NO_ERROR
  2036.         Debug-Output "OEMNSVRA.INF: findservice failed."
  2037.         goto fatalregistry
  2038.     endif
  2039.     set KeyParameters = $($R2)
  2040.     CloseRegKey $($R1)
  2041.     Shell $(!UtilityInf), GetBusTypeNum
  2042.     set BusTypeNum = $($R1)
  2043.     set NewValueList = +
  2044.         {{Ports, $(NoTitle), $(!REG_VT_DWORD), $(NewNumPorts)}, +
  2045.          {BusType, $(NoTitle), $(!REG_VT_DWORD), $(BusTypeNum)}}
  2046.     Shell  $(!UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  2047.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2048.          Debug-Output "AddValueList bombed out"
  2049.          goto ShellCodeError
  2050.     endif
  2051.     set RegistryErrorIndex = $($R0)
  2052.     CloseRegKey $(KeyParameters)
  2053.     Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  2054.         goto fatalregistry
  2055.     endif
  2056. WriteProtocolInfo =+
  2057.     Shell "" SaveSelectedProtocols $(fNetbeuiSelected) $(fTcpIpSelected) +
  2058.                                    $(fIpxSelected) $(fNetbeuiAllowed) +
  2059.                                    $(fTcpIpAllowed) $(fIpxAllowed)
  2060.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2061.          Debug-Output "Error shelling SaveSelectedProtocols"
  2062.          goto ShellCodeError
  2063.     endif
  2064.     ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2065.          Debug-Output "Error Saving selected protocols"
  2066.          goto end
  2067.     endif
  2068.     Shell "" WritePPPParameters
  2069.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2070.          Debug-Output "Error shelling WritePPPParameters"
  2071.          goto ShellCodeError
  2072.     endif
  2073.     ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2074.          Debug-Output "Error from WritePPPParameters"
  2075.          goto end
  2076.     endif
  2077.     ifstr(i) $(fNetbeuiChosen) == TRUE
  2078.         ifstr(i) $(fNetbeuiInstalled) == FALSE
  2079.             Shell "" InstallProtocol "NETBEUI"
  2080.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2081.                  Debug-Output "Error shelling InstallProtocol NETBEUI"
  2082.                  goto ShellCodeError
  2083.             endif
  2084.             ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2085.                  Debug-Output "Error installing NETBEUI"
  2086.                  goto end
  2087.             endif
  2088.         endif
  2089.     endif
  2090.     ifstr(i) $(fTcpIpChosen) == TRUE
  2091.         ifstr(i) $(fTcpIpInstalled) == FALSE
  2092.             Shell "" InstallProtocol "TCPIP"
  2093.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2094.                  Debug-Output "Error shelling InstallProtocol TCPIP"
  2095.                  goto ShellCodeError
  2096.             endif
  2097.             ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2098.                  Debug-Output "Error installing TCPIP"
  2099.                  goto end
  2100.             endif
  2101.         endif
  2102.         Shell "" InstallRasArpService
  2103.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2104.              Debug-Output "Error shelling InstallRasArpService"
  2105.              goto ShellCodeError
  2106.         endif
  2107.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2108.              Debug-Output "Error from InstallRasArpService"
  2109.              goto end
  2110.         endif
  2111.         set CommonStatus = STATUS_SUCCESSFUL
  2112.         Shell "" UpdateIPRouterInfo $(EnableIpRouter)
  2113.         Shell "" SaveTcpipInfo $(fTcpIpAllowed)
  2114.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2115.              Debug-Output "Error shelling SaveTcpipInfo"
  2116.              goto ShellCodeError
  2117.         endif
  2118.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2119.              Debug-Output "Error saving Tcpip info"
  2120.              goto end
  2121.         endif
  2122.     else
  2123.         Shell "" RemoveRasArpService
  2124.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2125.              Debug-Output "Error shelling RemoveRasArpService"
  2126.              goto ShellCodeError
  2127.         endif
  2128.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2129.              Debug-Output "Error from RemoveRasArpService"
  2130.              goto end
  2131.         endif
  2132.         Shell "" SaveTcpipInfo $(fTcpIpAllowed)
  2133.         set CommonStatus = STATUS_SUCCESSFUL
  2134.     endif
  2135.     ifstr(i) $(fIpxChosen) == TRUE
  2136.         ifstr(i) $(fIpxInstalled) == FALSE
  2137.             Shell "" InstallProtocol "IPX"
  2138.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2139.                  Debug-Output "Error shelling InstallProtocol IPX"
  2140.                  goto ShellCodeError
  2141.             endif
  2142.             ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2143.                  Debug-Output "Error installing IPX"
  2144.                  goto end
  2145.             endif
  2146.         endif
  2147.         OpenRegKey $(!REG_H_LOCAL) ""  +
  2148.                    $(!NTN_ServiceBase)"\NWLNKIPX\Parameters"  +
  2149.                    $(!MAXIMUM_ALLOWED) KeyIpxParameters
  2150.         ifstr $(KeyIpxParameters) != $(KeyNull)
  2151.            GetRegValue $(KeyIpxParameters), "SingleNetworkActive"  +
  2152.                        SingleNetworkActive
  2153.            ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  2154.                SetRegValue $(KeyIpxParameters) +
  2155.                            {SingleNetworkActive, 0, $(!REG_VT_DWORD), 1}
  2156.            endif
  2157.            GetRegValue $(KeyIpxParameters), "DisableDialoutSap"  +
  2158.                        DisableDialoutSap
  2159.            ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  2160.                SetRegValue $(KeyIpxParameters) +
  2161.                            {DisableDialoutSap, 0, $(!REG_VT_DWORD), 1}
  2162.            endif
  2163.            GetRegValue $(KeyIpxParameters), "DisableDialinNetbios"  +
  2164.                        DisableDialinNetbios
  2165.            ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  2166.                SetRegValue $(KeyIpxParameters) +
  2167.                            {DisableDialinNetbios, 0, $(!REG_VT_DWORD), 1}
  2168.            endif
  2169.            CloseRegKey $(KeyIpxParameters)
  2170.         Endif
  2171.         else
  2172.             Debug-Output "OEMNSVRA.INF: error opening NWLNKIPX\Parameters key"
  2173.         endif
  2174.         Shell "" SaveIpxInfo $(EnableIpxRouter) $(fIpxAllowed)
  2175.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2176.              Debug-Output "Error shelling SaveIpxInfo"
  2177.              goto ShellCodeError
  2178.         endif
  2179.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2180.              Debug-Output "Error saving Ipx info"
  2181.              goto end
  2182.         endif
  2183.         ifint $(EnableIpxRouter) == 1
  2184.             Shell "" InstallNwlnkRipService
  2185.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2186.                  Debug-Output "Error shelling InstallNwlnkRipService"
  2187.                  goto ShellCodeError
  2188.             endif
  2189.             ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2190.                  Debug-Output "Error from InstallNwlnkRipService"
  2191.                  goto end
  2192.             endif
  2193.             set CommonStatus = STATUS_SUCCESSFUL
  2194.             Shell "" InstallIsnSapService
  2195.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2196.                  Debug-Output "Error shelling InstallIsnSapService"
  2197.                  goto ShellCodeError
  2198.             endif
  2199.             ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2200.                  Debug-Output "Error from InstallIsnSapService"
  2201.                  goto end
  2202.             endif
  2203.             set CommonStatus = STATUS_SUCCESSFUL
  2204.         else
  2205.             Shell "" RemoveNwlnkRipService
  2206.             Shell "" RemoveIsnSapService
  2207.         endif
  2208.         Shell "" UpdateIPXRouterInfo $(EnableWanRouter)
  2209.         Ifstr(i) $(!NTN_InstallPhase) != primary
  2210.             shell $(subroutninf) PopBillBoard
  2211.             Set BillboardVisible = 0
  2212.         Endif
  2213.     else
  2214.         Shell "" SaveIpxInfo $(EnableIpxRouter) $(fIpxAllowed)
  2215.     endif
  2216. WriteParametersOver = +
  2217.     EndWait
  2218.     goto successful
  2219. RemoveRas = +
  2220.     StartWait
  2221.     set REMOVE_SOFTWARE = {}
  2222.     shell "" QueryComponentsInstalled
  2223.     Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  2224.         Set InstalledComps = $($R1)
  2225.         Set InstalledFlags = $($R2)
  2226.         Set DoServer      = *($(InstalledFlags),1)
  2227.         Set DoClient      = *($(InstalledFlags),2)
  2228.         Set DoAdmin       = *($(InstalledFlags),3)
  2229.         Set DoServerOnly  = *($(InstalledFlags),4)
  2230.         Set DoClientOnly  = *($(InstalledFlags),5)
  2231.         Set DoAdminOnly   = *($(InstalledFlags),6)
  2232.     Endif
  2233.     Debug-Output "Installed List is "$(InstalledComps)
  2234.     Debug-Output "Installed Flags is "$(InstalledFlags)
  2235.     ifstr(i) $(DoAdminOnly) == TRUE
  2236.          set REMOVE_SOFTWARE = {$(ProductRASName)}
  2237.          goto RemoveSoftware
  2238.     endif
  2239.     set REMOVE_SOFTWARE = >($(REMOVE_SOFTWARE), $(ProductRASName))
  2240.     ifstr(i) $(DoServer) == TRUE
  2241.          set REMOVE_SOFTWARE = >($(REMOVE_SOFTWARE), $(ProductRASSVRName))
  2242.     endif
  2243.     set REMOVE_SOFTWARE = >($(REMOVE_SOFTWARE), $(ProductRASMANName))
  2244.     set REMOVE_SOFTWARE = >($(REMOVE_SOFTWARE), $(!ProductRASAUTODIALName))
  2245.     OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) $(!MAXIMUM_ALLOWED) KeyNetcards
  2246.     ifstr $(KeyNetcards) == $(KeyNull)
  2247.          Debug-Output "OEMNSVRA.INF: could not open Netcards key"
  2248.          goto RemoveSoftware
  2249.     endif
  2250.     EnumRegKey $(KeyNetcards) NetcardsList
  2251.     ForListDo $(NetcardsList)
  2252.        set KeyName = *($($),1)
  2253.        OpenRegKey $(KeyNetcards) "" $(KeyName) $(!MAXIMUM_ALLOWED) Card
  2254.        ifstr $(Card) == $(KeyNull)
  2255.            Debug-Output "OEMNSVRA.INF: could not open netcard key"
  2256.            goto RemoveSoftware
  2257.        endif
  2258.        GetRegValue $(Card), "ProductName" ProductNameInfo
  2259.        set CardProductName = *($(ProductNameInfo), 4)
  2260.        ifstr(i) $(CardProductName) == $(!ProductNDISWANName)
  2261.           set !NETCARD_LIST = >($(!NETCARD_LIST), +
  2262.                 {$(!ProductNDISWANName),+
  2263.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  2264.        else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINName)
  2265.           set !NETCARD_LIST = >($(!NETCARD_LIST), +
  2266.                 {$(!ProductNDISWANName),+
  2267.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  2268.        else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALOUTName)
  2269.           set !NETCARD_LIST = >($(!NETCARD_LIST), +
  2270.                 {$(!ProductNDISWANName),+
  2271.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  2272.        else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINIPName)
  2273.           set !NETCARD_LIST = >($(!NETCARD_LIST), +
  2274.                 {$(!ProductNDISWANName),+
  2275.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  2276.        else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALOUTIPName)
  2277.           set !NETCARD_LIST = >($(!NETCARD_LIST), +
  2278.                 {$(!ProductNDISWANName),+
  2279.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  2280.        else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINOUTIPXName)
  2281.           set !NETCARD_LIST = >($(!NETCARD_LIST), +
  2282.                 {$(!ProductNDISWANName),+
  2283.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  2284.        else-ifstr(i) $(CardProductName) == $(ProductRASASYMACName)
  2285.           set !NETCARD_LIST = >($(!NETCARD_LIST),+
  2286.                                 {$(ProductRASASYMACName),+
  2287.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  2288.        endif
  2289.        CloseRegKey $(Card)
  2290.     EndForListDo
  2291.     CloseRegKey $(KeyNetcards)
  2292.     read-syms StatusUpdatingRegistry$(!STF_LANGUAGE)
  2293.     QueryListSize NumRemove $(!NETCARD_LIST)
  2294.     ForListDo  $(!NETCARD_LIST)
  2295.         shell $(subroutninf) PushBillBoard NETSTATUSDLG +
  2296.                               $(RemovingAdapters)" "$(NumRemove)
  2297.         Set BillboardVisible = 1
  2298.         debug-output "Removing hardware component: "$($)
  2299.         Shell $(!UtilityInf), RemoveHardwareComponent, $(!Manufacturer),+
  2300.               *($($),1), *($($),2)
  2301.         set-sub NumRemove = $(NumRemove), 1
  2302.     EndForListDo
  2303.     ifint $(BillboardVisible) != 0
  2304.         Shell "subroutn.inf" PopBillboard
  2305.         Set BillboardVisible = 0
  2306.     Endif
  2307. RemoveSoftware = +
  2308.     Shell "" RemoveRasArpService
  2309.     Shell "" RemoveNdisTapiService
  2310.     Shell "" RemoveRasAcdService
  2311.     set RasTapiDevicesKey = $(KeyNull)
  2312.     OpenRegKey $(!REG_H_LOCAL) "" $(RasTapiDevicesKeyName) $(!MAXIMUM_ALLOWED) RasTapiDevicesKey
  2313.     ifstr $(RasTapiDevicesKey) != $(KeyNull)
  2314.        set TapiProviderList = {}
  2315.        EnumRegKey $(RasTapiDevicesKey) TapiProviderList
  2316.        ForListDo $(TapiProviderList)
  2317.            set ProviderName = *($($),1)
  2318.            Debug-Output "OEMNSVRA.INF: Removing "$(ProviderName)" dependency on NdisTapi."
  2319.            Shell "" RemoveServiceDependency $(ProviderName) "NdisTapi"
  2320.        EndForListDo
  2321.     EndIf
  2322.     set fIpxAllowed = FALSE
  2323.     Shell "" QuerySelectedProtocols
  2324.     ifstr(i) $($R0) == STATUS_SUCCESSFUL
  2325.         set fIpxAllowed = $($R6)
  2326.     else
  2327.         Debug-Output "RemoveRas: error QuerySelectedProtocols"
  2328.     endif
  2329.     ifstr(i) $(fIpxAllowed) == TRUE
  2330.         Shell "" RemoveNwlnkRipService
  2331.         Shell "" RemoveIsnSapService
  2332.     endif
  2333.     Debug-Output "Remove Software List "$(REMOVE_SOFTWARE)
  2334.     ForListDo  $(REMOVE_SOFTWARE)
  2335.         Debug-Output "Removing software component: "$($)
  2336.         ifstr(i) $($) == RAS
  2337.              OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyBase) +
  2338.                         $(!MAXIMUM_ALLOWED) ProductKey
  2339.              Ifstr $(ProductKey) == $(KeyNull)
  2340.                 Debug-Output "OEMNSVRA.INF: could not open Software product key"
  2341.                  goto RemoveFiles
  2342.              endif
  2343.              DeleteRegTree $(ProductKey) $(Product$($)Name)
  2344.              CloseRegKey $(ProductKey)
  2345.         else
  2346.             Shell $(!UtilityInf), RemoveSoftwareComponent, $(!Manufacturer), $($)
  2347.         endif
  2348.     EndForListDo
  2349. RemoveFiles = +
  2350.     Install RemoveRasFiles
  2351.     ifstr(i) $(DoServerOnly) == FALSE
  2352.         Install RemoveRasGroup
  2353.     endif
  2354.     Shell "" RemoveInfFromReviewPrograms
  2355.     shell "" RemoveNetGroupDependency
  2356. RemoveRasOver = +
  2357.     Debug-Output "OEMNSVRA.INF: Doing a forcible cleanup..."
  2358.     OpenRegKey $(!REG_H_LOCAL) ""  $(!NTN_SoftwareBase)"\Microsoft" +
  2359.                $(!MAXIMUM_ALLOWED) KeySoftware
  2360.     ifstr $(KeySoftware) != $(KeyNull)
  2361.         set SoftList = {"ASYNCMAC", "NDISWAN", "RAS", "RASMAN", +
  2362.                         "RASAUTO", "REMOTEACCESS"}
  2363.         ForListDo $(SoftList)
  2364.             DeleteRegTree $(KeySoftware) $($)
  2365.         EndForListDo
  2366.         set NetworkCardKey = $(KeyNull)
  2367.         OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) +
  2368.                    $(!MAXIMUM_ALLOWED) NetworkCardKey
  2369.         Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  2370.             set NetcardsList = {}
  2371.             EnumRegKey $(NetworkCardKey) NetcardsList
  2372.             Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  2373.               ForListDo $(NetcardsList)
  2374.                set KeyName = *($($),1)
  2375.                set Card = $(KeyNull)
  2376.                OpenRegKey $(NetworkCardKey) "" $(KeyName) $(!MAXIMUM_ALLOWED) Card
  2377.                ifstr $(Card) == $(KeyNull)
  2378.                    Debug-Output "RemoveRas: could not open netcard key "$(KeyName)
  2379.                else
  2380.                    GetRegValue $(Card), "ProductName" ProductNameInfo
  2381.                    Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  2382.                       Debug-Output "RemoveRas: ProductName not found."
  2383.                    else
  2384.                       set CardProductName = *($(ProductNameInfo), 4)
  2385.                       Debug-Output "RemoveRas: ProductName. "$(CardProductName)
  2386.                       ifstr(i) $(CardProductName) == $(!ProductNDISWANName)
  2387.                          DeleteRegTree $(NetworkCardKey) $(KeyName)
  2388.                       endif
  2389.                       ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINName)
  2390.                           DeleteRegTree $(NetworkCardKey) $(KeyName)
  2391.                       endif
  2392.                       ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALOUTName)
  2393.                           DeleteRegTree $(NetworkCardKey) $(KeyName)
  2394.                       endif
  2395.                       ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINIPName)
  2396.                           DeleteRegTree $(NetworkCardKey) $(KeyName)
  2397.                       endif
  2398.                       ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALOUTIPName)
  2399.                           DeleteRegTree $(NetworkCardKey) $(KeyName)
  2400.                       endif
  2401.                       ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINOUTIPXName)
  2402.                           DeleteRegTree $(NetworkCardKey) $(KeyName)
  2403.                       endif
  2404.                       ifstr(i) $(CardProductName) == $(ProductRASASYMACName)
  2405.                           DeleteRegTree $(NetworkCardKey) $(KeyName)
  2406.                       endif
  2407.                    endif
  2408.               EndForListDo
  2409.             else
  2410.               Debug-Output "RemoveRas: EnumRegKey failed."
  2411.             endif
  2412.         else
  2413.             Debug-Output "RemoveRas: failed to open "$(!NetworkCardKeyName)
  2414.         endif
  2415.         CloseRegKey $(KeySoftware)
  2416.     else
  2417.         Debug-Output "RemoveRas: failed to open software key"
  2418.     endif
  2419.     OpenRegKey $(!REG_H_LOCAL) ""  $(!NTN_ServiceBase) +
  2420.                $(!MAXIMUM_ALLOWED) KeyServices
  2421.     ifstr $(KeyServices) != $(KeyNull)
  2422.         set ServiceList = {"ASYNCMAC", "NDISWAN", "RASARP", "RASMAN", +
  2423.                            "REMOTEACCESS", "RASACD", "RASAUTO"}
  2424.         ForListDo $(ServiceList)
  2425.             DeleteRegTree $(KeyServices) $($)
  2426.         EndForListDo
  2427.         EnumRegKey $(KeyServices) ServiceList
  2428.         Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  2429.            ForListDo $(ServiceList)
  2430.                set ServiceName = *($($),1)
  2431.                set Result = 1
  2432.             LibraryProcedure Result $(!LIBHANDLE) SetupStrncmp +
  2433.                                 $(ServiceName) "NdisWan" 7
  2434.                ifint $(Result) == 0
  2435.                   Debug-Output "RemoveRas: Removing "$(ServiceName)
  2436.                   DeleteRegTree $(KeyServices) $(ServiceName)
  2437.                else
  2438.                    LibraryProcedure Result $(!LIBHANDLE) SetupStrncmp +
  2439.                                 $(ServiceName) "AsyncMac" 8
  2440.                    ifint $(Result) == 0
  2441.                       Debug-Output "RemoveRas: Removing "$(ServiceName)
  2442.                       DeleteRegTree $(KeyServices) $(ServiceName)
  2443.                    endif
  2444.                endif
  2445.            EndForListDo
  2446.         endif
  2447.         CloseRegKey $(KeyServices)
  2448.     endif
  2449.     EndWait
  2450.     goto $(to)
  2451. BindingsRas = +
  2452.     Debug-Output "OEMNSVRA.INF:Review bindings is being called!!!."
  2453.     Shell "" UpdateSelectedProtocols
  2454.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2455.         Debug-Output "error shelling UpdateSelectedProtocols."
  2456.         goto ShellCodeError
  2457.     endif
  2458.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2459.         Debug-Output "error returned by UpdateSelectedProtocols."
  2460.     endif
  2461.     set fNetbeuiChosen = $($R1)
  2462.     set fTcpIpChosen   = $($R2)
  2463.     set fIpxChosen     = $($R3)
  2464.     ifstr(i) $(fNetbeuiChosen) == FALSE
  2465.         ifstr(i) $(fTcpIpChosen) == FALSE
  2466.             ifstr(i) $(fIpxChosen) == FALSE
  2467.                 read-syms NoProtocolsDlg$(!STF_LANGUAGE)
  2468.                 Shell $(subroutninf) SetupMessage, $(!STF_LANGUAGE), "STATUS", $(NoProtocolsWarning)
  2469.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2470.                     goto ShellCodeError
  2471.                 endif
  2472.                 goto end
  2473.             endif
  2474.         endif
  2475.     endif
  2476.     set WkstaConfigured = FALSE
  2477.     set SrvrConfigured  = FALSE
  2478.     shell "" IsNetworkConfigured
  2479.     Debug-Output "IsNetworkConfigured returned R0 "$($R0)
  2480.     Debug-Output "IsNetworkConfigured returned R1 "$($R1)
  2481.     Debug-Output "IsNetworkConfigured returned R2 "$($R2)
  2482.     ifstr(i) $($R0) == STATUS_SUCCESSFUL
  2483.         set WkstaConfigured  = $($R1)
  2484.         set SrvrConfigured   = $($R2)
  2485.     else
  2486.         read-syms NetworkConfigError$(!STF_LANGUAGE)
  2487.         set Text = $(Text1)
  2488.         shell $(subroutninf) SetupMessage $(!STF_LANGUAGE) "FATAL" $(Text)
  2489.         goto end
  2490.     endif
  2491.     ifstr(i) $(WkstaConfigured) == TRUE
  2492.         ifstr(i) $(SrvrConfigured) == TRUE
  2493.             goto ResetProgramList
  2494.         else
  2495.             goto InstallNetworkError
  2496.         endif
  2497.     else
  2498.         goto InstallNetworkError
  2499.     endif
  2500. InstallNetworkError =+
  2501.     set CommonStatus = STATUS_USERCANCEL
  2502.     read-syms NetworkConfigError$(!STF_LANGUAGE)
  2503.     set Text = $(Text2)
  2504.     shell $(subroutninf) SetupMessage $(!STF_LANGUAGE) "STATUS" $(Text)
  2505. ResetProgramList =+
  2506.     OpenRegKey $(!REG_H_LOCAL) "" $(!RasManKeyName) $(!MAXIMUM_ALLOWED) KeyRasMan
  2507.     ifstr $(KeyRasMan) != $(KeyNull)
  2508.         GetRegValue $(KeyRasMan), "Review" ReviewInfo
  2509.         set ReviewValue = *($(ReviewInfo), 4)
  2510.         ifint $(ReviewValue) == 1
  2511.             Debug-Output "BindingsRas: resetting Review to 0"
  2512.             SetRegValue $(KeyRasMan) {Review,$(NoTitle),$(!REG_VT_DWORD), 0}
  2513.             Shell "" AddInfToReviewProgramsList
  2514.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2515.                 Debug-Output "error shelling AddInfToReviewProgramsList."
  2516.                 goto ShellCodeError
  2517.             endif
  2518.             ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2519.                 Debug-Output "error returned by AddInfToReviewProgramsList."
  2520.             endif
  2521.         endif
  2522.         CloseRegKey $(KeyRasMan)
  2523.     else
  2524.         Debug-Output "OEMNSVRA.INF: error opening SOFTWARE\RasMan\CurrentVersion key."
  2525.     endif
  2526.     shell "" QueryComponentsInstalled
  2527.     Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  2528.         Set InstalledComps = $($R1)
  2529.         Set InstalledFlags = $($R2)
  2530.         Set DoServer      = *($(InstalledFlags),1)
  2531.         Set DoClient      = *($(InstalledFlags),2)
  2532.         Set DoAdmin       = *($(InstalledFlags),3)
  2533.         Set DoServerOnly  = *($(InstalledFlags),4)
  2534.         Set DoClientOnly  = *($(InstalledFlags),5)
  2535.         Set DoAdminOnly   = *($(InstalledFlags),6)
  2536.     Endif
  2537.     Debug-Output "Installed List is "$(InstalledComps)
  2538.     Debug-Output "Installed Flags is "$(InstalledFlags)
  2539.     set AsyStartValue = 4
  2540.     OpenRegKey $(!REG_H_LOCAL) "" $(RasAsyMacKeyName) $(!MAXIMUM_ALLOWED) KeyMac
  2541.     ifstr $(KeyMac) == $(KeyNull)
  2542.         Debug-Output "OEMNSVRA.INF: could not open AsyncMac key"
  2543.     else
  2544.         GetRegValue $(KeyMac), "Start" AsyStartInfo
  2545.         ifint $(RegLastError) == 0
  2546.             set AsyStartValue = *($(AsyStartInfo), 4)
  2547.         endif
  2548.         Debug-Output "OEMNSVRA.INF: AsyncMac start value "$(AsyStartValue)
  2549.         CloseRegKey $(KeyMac)
  2550.     endif
  2551.     set NdisWanParam = {}
  2552.     set NdisWanEndPointsLst = {}
  2553.     ifint $(AsyStartValue) != 4
  2554.         set RasMacLinkageKey = $(KeyNull)
  2555.         OpenRegKey $(!REG_H_LOCAL) "" $(RasMacLinkageKeyName) $(!MAXIMUM_ALLOWED) RasMacLinkageKey
  2556.         ifstr $(RasMacLinkageKey) == $(KeyNull)
  2557.             Debug-Output "OEMNSVRA.INF: could not open AsyncMac linkage key"
  2558.             set RegistryErrorIndex = UNABLE_ACCESS_CONFIGURE_SERVICE
  2559.             goto fatalregistry
  2560.         endif
  2561.         GetRegValue $(RasMacLinkageKey), "Bind" BindInfo
  2562.     set NdisWanParam = *($(BindInfo), 4)
  2563.         CloseRegKey $(RasMacLinkageKey)
  2564.     set NdisWanParamKey = $(KeyNull)
  2565.     OpenRegKey $(!REG_H_LOCAL) "" $(NdisWanParamKeyName) $(!MAXIMUM_ALLOWED) NdisWanParamKey
  2566.     ifstr $(NdisWanParamKey) == $(KeyNull)
  2567.         Debug-Output "OEMNSVRA.INF: could not open NdisWanParamKey"
  2568.         else
  2569.         GetRegValue $(NdisWanParamKey), "EndPoints" EndPointsInfo
  2570.             set EndPointsLst = *($(EndPointsInfo), 4)
  2571.         set NdisWanEndPointsLst = >($(NdisWanEndPointsLst),*($(EndPointsLst), 1))
  2572.         CloseRegKey $(NdisWanParamKey)
  2573.         endif
  2574.     endif
  2575.     set ProviderList = {}
  2576.     set RasTapiDevicesKey = $(KeyNull)
  2577.     OpenRegKey $(!REG_H_LOCAL) "" $(RasTapiDevicesKeyName) $(!MAXIMUM_ALLOWED) RasTapiDevicesKey
  2578.     ifstr $(RasTapiDevicesKey) != $(KeyNull)
  2579.        set TapiProviderList = {}
  2580.        EnumRegKey $(RasTapiDevicesKey) TapiProviderList
  2581.        ForListDo $(TapiProviderList)
  2582.            set TapiAddress = {}
  2583.            set NumEndPoints = 0
  2584.            set ProviderName = *($($),1)
  2585.            Debug-Output "OEMNSVRA.INF: TAPI provider name = "$(ProviderName)
  2586.            OpenRegKey $(RasTapiDevicesKey) "" $(ProviderName) $(!MAXIMUM_ALLOWED) Provider
  2587.            ifstr $(Provider) != $(KeyNull)
  2588.                GetRegValue $(Provider), "Address" TapiAddress
  2589.                set AdapterNum = ""
  2590.                set EndPointCount = 0
  2591.                set tmpNdisWanParam = {}
  2592.                set tmpNdisWanEndPointsLst = {}
  2593.                set DeviceName = ""
  2594.                ForListDo *($(TapiAddress),4)
  2595.                    Split-String $($) "- " Address
  2596.                    set NewAdapterNum = *($(Address), 1)
  2597.                    ifstr(i) $(AdapterNum) != $(NewAdapterNum)
  2598.                      ifstr(i) $(AdapterNum) != ""
  2599.                         set tmpNdisWanParam = >($(tmpNdisWanParam), $(DeviceName))
  2600.                         set tmpNdisWanEndPointsLst = >($(tmpNdisWanEndPointsLst), $(EndPointCount))
  2601.                         set EndPointCount = 0
  2602.                      endif
  2603.                      set AdapterNum = $(NewAdapterNum)
  2604.                      set DeviceName = "\Device\"$(ProviderName)$(AdapterNum)
  2605.                    endif
  2606.                    set-add EndPointCount = $(EndPointCount), 1
  2607.                EndForListDo
  2608.                ifstr $(DeviceName) != ""
  2609.                    set tmpNdisWanParam = >($(tmpNdisWanParam), $(DeviceName))
  2610.                    set tmpNdisWanEndPointsLst = >($(tmpNdisWanEndPointsLst), $(EndPointCount))
  2611.                endif
  2612.                CloseRegKey $(Provider)
  2613.            else
  2614.               Debug-Output "OEMNSVRA.INF: could not open RAS\TAPI DEVICES\"$(DriverName)" key."
  2615.            endif
  2616.            set ProviderKeyName = $(!NTN_ServiceBase)"\"$(ProviderName)
  2617.            set ProviderLinkageKeyName = $(!NTN_ServiceBase)"\"$(ProviderName)"\Linkage"
  2618.            Debug-Output "TAPI provider key name "$(ProviderKeyName)
  2619.            set ProviderKey = $(KeyNull)
  2620.            set ProviderLinkageKey = $(KeyNull)
  2621.            OpenRegKey $(!REG_H_LOCAL) "" $(ProviderKeyName) $(!MAXIMUM_ALLOWED) ProviderKey
  2622.            ifstr $(ProviderKey) == $(KeyNull)
  2623.              Debug-Output "OEMNSVRA.INF: could not open key "$(ProviderKeyName)
  2624.            else
  2625.              set DeleteFlag = 0
  2626.              set DeleteFlagInfo = {}
  2627.              GetRegValue $(ProviderKey),"DeleteFlag", DeleteFlagInfo
  2628.              set DeleteFlag = *($(DeleteFlagInfo), 4)
  2629.              ifint $(DeleteFlag) != 1
  2630.                set ProviderList = >($(ProviderList), $(ProviderName))
  2631.                Shell "" AddServiceDependency $(ProviderName) "NdisTapi"
  2632.                ForListDo $(tmpNdisWanParam)
  2633.                  set NdisWanParam = >($(NdisWanParam), $($))
  2634.                  set NdisWanEndPointsLst = >($(NdisWanEndPointsLst), *($(tmpNdisWanEndPointsLst), $(#)))
  2635.                EndForListDo
  2636.              endif
  2637.              CloseRegKey $(ProviderKey)
  2638.            endif
  2639.        EndForListDo
  2640.        CloseRegKey $(RasTapiDevicesKey)
  2641.     else
  2642.         Debug-Output "OEMNSVRA.INF: could not open RAS\TAPI DEVICES key"
  2643.     endif
  2644.     set NumBindings = 0
  2645.     Debug-Output "NdisWan param Bind value = "$(NdisWanParam)
  2646.     QueryListSize NumBindings $(NdisWanParam)
  2647.     Debug-Output "Number of Ndiswan bindings = "$(NumBindings)
  2648.     ifint $(NumBindings) == 0
  2649.         Debug-Output "OEMNSVRA.INF: No ports are configured"
  2650.         read-syms NoPortsConfigured$(!STF_LANGUAGE)
  2651.         Shell $(subroutninf) SetupMessage, $(!STF_LANGUAGE), "STATUS", $(NoPortsError)
  2652.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2653.             goto ShellCodeError
  2654.         endif
  2655.         goto end
  2656.     endif
  2657.     OpenRegKey $(!REG_H_LOCAL) "" $(NdisWanParamKeyName) $(!MAXIMUM_ALLOWED) NdisWanParamKey
  2658.     ifstr $(NdisWanParamKey) == $(KeyNull)
  2659.     Debug-Output "OEMNSVRA.INF: could not open NdisWanParamKey"
  2660.         set RegistryErrorIndex = UNABLE_ACCESS_CONFIGURE_SERVICE
  2661.         goto fatalregistry
  2662.     endif
  2663.     Debug-Output "Setting NdisWan param Bind to "$(NdisWanParam)
  2664.     set NewValueList = {{Bind, $(NoTitle), $(!REG_VT_MULTI_SZ), $(NdisWanParam)}}
  2665.     Shell $(!UtilityInf), AddValueList, $(NdisWanParamKey), $(NewValueList)
  2666.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2667.     CloseRegKey $(NdisWanParamKey)
  2668.         goto ShellCodeError
  2669.     endif
  2670.     Debug-Output "Setting NdisWan param EndPoints to "$(NdisWanEndPointsLst)
  2671.     set NewValueList = {{EndPoints, $(NoTitle), $(!REG_VT_MULTI_SZ), $(NdisWanEndPointsLst)}}
  2672.     Shell $(!UtilityInf), AddValueList, $(NdisWanParamKey), $(NewValueList)
  2673.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2674.     CloseRegKey $(NdisWanParamKey)
  2675.         goto ShellCodeError
  2676.     endif
  2677.     CloseRegKey $(NdisWanParamKey)
  2678.     LoadLibrary "x" $(!STF_CWDDIR)rascfg.dll PORTSDLGHANDLE
  2679.     LibraryProcedure Result, $(PORTSDLGHANDLE), InitRasmanSecurityDescriptor
  2680.     Debug-Output "Result of setting Rasman security descriptor "$(Result)
  2681.     LibraryProcedure Result, $(PORTSDLGHANDLE), InitRemoteSecurityDescriptor
  2682.     Debug-Output "Result of setting Remote security descriptor "$(Result)
  2683.     Shell "" UpdateCPList
  2684.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2685.         Debug-Output "error shelling UpdateCPList."
  2686.         goto ShellCodeError
  2687.     endif
  2688.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2689.         Debug-Output "error returned by UpdateCPList."
  2690.     endif
  2691.     ifstr(i) $(fTcpIpChosen) == TRUE
  2692.         shell "" UpdateLLInterface
  2693.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2694.             Debug-Output "error shelling UpdateLLInterface."
  2695.             goto ShellCodeError
  2696.         endif
  2697.         Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2698.             Debug-Output "error returned by UpdateLLInterface."
  2699.         endif
  2700.     endif
  2701.     Shell "" SetRasArpBindValueFromTcpIP
  2702.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2703.         Debug-Output "error shelling SetRasArpBindValueFromTcpIP."
  2704.         goto ShellCodeError
  2705.     endif
  2706.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2707.         Debug-Output "error returned by SetRasArpBindValueFromTcpIP."
  2708.     endif
  2709.     Debug-Output "Review bindings done."
  2710.     goto end
  2711. UpgradeRas = +
  2712.     Debug-Output "OEMNSVRA.INF: Upgrade with Option type "$(Option)
  2713.     ifstr(i) $(Option) != "RAS"
  2714.         Debug-Output "OEMNSVRA.INF: not upgrading due to nonras option"
  2715.         set CommonStatus = STATUS_NOEFFECT
  2716.         goto end
  2717.     endif
  2718.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(!MAXIMUM_ALLOWED) KeyProduct
  2719.     Ifstr $(KeyProduct) != $(KeyNull)
  2720.         Shell $(!UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  2721.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2722.             Debug-Output "ShellCode error"
  2723.             goto ShellCodeError
  2724.         endif
  2725.         set !UG_Filename = $($R0)
  2726.         ifstr(i) $(!UG_Filename) != ""
  2727.             Debug-Output "File Name is "$(!UG_Filename)
  2728.             StartWait
  2729.             read-syms UpgradeErrors$(!STF_LANGUAGE)
  2730.             read-syms StatusUpdatingRegistry$(!STF_LANGUAGE)
  2731.             Shell "subroutn.inf" PushBillboard NETSTATUSDLG $(UpdatingRas)
  2732.             Set BillboardVisible = 1
  2733.             shell "" QueryComponentsInstalled
  2734.             Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  2735.                 Set InstalledComps = $($R1)
  2736.                 Set InstalledFlags = $($R2)
  2737.                 Set DoServer      = *($(InstalledFlags),1)
  2738.                 Set DoClient      = *($(InstalledFlags),2)
  2739.                 Set DoAdmin       = *($(InstalledFlags),3)
  2740.                 Set DoServerOnly  = *($(InstalledFlags),4)
  2741.                 Set DoClientOnly  = *($(InstalledFlags),5)
  2742.                 Set DoAdminOnly   = *($(InstalledFlags),6)
  2743.             Endif
  2744.             Debug-Output "Installed List is "$(InstalledComps)
  2745.             Debug-Output "Installed Flags is "$(InstalledFlags)
  2746.             Set ServerInstalled = $(DoServer)
  2747.             Set ClientInstalled = $(DoClient)
  2748.             Set AdminInstalled  = $(DoAdmin)
  2749.             Install InstallResources
  2750.             ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  2751.                 goto filecopycancel
  2752.             endif
  2753.             Install InstallRasFiles
  2754.             ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  2755.                 goto filecopycancel
  2756.             endif
  2757.             set fTcpIp = FALSE
  2758.             Shell "" QuerySelectedProtocols
  2759.             Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2760.                 Debug-Output "error returned by QuerySelectedProtocols."
  2761.             endif
  2762.             set fNetbeuiSelected = $($R1)
  2763.             set fTcpIpSelected   = $($R2)
  2764.             set fIpxSelected     = $($R3)
  2765.             set fNetbeuiAllowed  = $($R4)
  2766.             set fTcpIpAllowed    = $($R5)
  2767.             set fIpxAllowed      = $($R6)
  2768.             ifstr(i) $(fTcpIpSelected) == TRUE
  2769.               set fTcpIp = "TRUE"
  2770.             else-ifstr(i) $(fTcpIpAllowed) == TRUE
  2771.               set fTcpIp = "TRUE"
  2772.             endif
  2773.             ifstr(i) $(fTcpIp) == TRUE
  2774.                 Shell "" RemoveServiceDependency "TCPIP" "RASARP"
  2775.                 Shell "" RemoveRasArpService
  2776.                 Shell "" InstallRasArpService
  2777.             endif
  2778.             Shell "" SetRestoreConnectionTo1
  2779.             Shell "" RemoveServiceDependency "RemoteAccess" "NetLogon"
  2780.             Shell "" AddServiceDependency "RasMan" "tapisrv"
  2781.             Shell "" InstallSoftwareAndService RASAUTODIAL
  2782.             Shell "" AddServiceDependency "RasAuto" "RasMan"
  2783.             Shell "" RemoveRasAcdService
  2784.             Shell "" InstallRasAcdService
  2785.             OpenRegKey $(!REG_H_LOCAL) "" $(!RasManSvcKeyName) $(!MAXIMUM_ALLOWED) KeyRasMan
  2786.             ifstr $(KeyRasMan) == $(KeyNull)
  2787.               Debug-Output "OEMNSVRA.INF: could not open RasMan key"
  2788.             else
  2789.               SetRegValue $(KeyRasMan) {Type, $(NoTitle), $(!REG_VT_DWORD), 32}
  2790.               CloseRegKey $(KeyRasMan)
  2791.             endif
  2792.             LoadLibrary "x" $(!STF_CWDDIR)rascfg.dll PORTSDLGHANDLE
  2793.             LibraryProcedure Result, $(PORTSDLGHANDLE), RenameRasHubToNdisWan
  2794.             Shell "" RenameRasHubToNdisWan
  2795.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2796.                 Debug-Output "OEMNSVRA.INF:error shelling RenameRasHubToNdisWan."
  2797.                 goto ShellCodeError
  2798.             endif
  2799.             Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2800.                 Debug-Output "OEMNSVRA.INF:error returned by RenameRasHubToNdisWan."
  2801.                 goto end
  2802.             endif
  2803.             Shell "" IsNdisWanBHAdapterInstalled
  2804.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2805.                Debug-Output "OEMNSVRA.INF:error shelling IsNdisWanBHAdapterInstalled"
  2806.                goto ShellCodeError
  2807.             endif
  2808.             ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2809.                 Shell "" InstallNdisWanBHAdapter
  2810.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2811.                    Debug-Output "OEMNSVRA.INF:error shelling InstallNdisWanBHAdapter"
  2812.                    goto ShellCodeError
  2813.                 endif
  2814.                 ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2815.                      set RegistryErrorIndex = $($R0)
  2816.                      Debug-Output "Error installing NdisWan Blood hound adapter"
  2817.                      goto fatalregistry
  2818.                 endif
  2819.             endif
  2820.             Shell "" InstallNdisTapiService
  2821.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2822.                  Debug-Output "Error shelling InstallNdisTapiService "
  2823.                  goto ShellCodeError
  2824.             endif
  2825.             ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2826.                  set RegistryErrorIndex = $($R0)
  2827.                  Debug-Output "Error installing NdisTapi Service"
  2828.                  goto fatalregistry
  2829.             endif
  2830.             Shell "" UpdateAsyncMacNetRules
  2831.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2832.                 Debug-Output "OEMNSVRA.INF:error shelling UpdateAsyncMacNetRules."
  2833.                 goto ShellCodeError
  2834.             endif
  2835.             Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2836.                 Debug-Output "OEMNSVRA.INF:error returned by UpdateAsyncMacNetRules."
  2837.                 goto end
  2838.             endif
  2839.             Shell "" UpdateNdisWanInfo
  2840.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2841.                 Debug-Output "OEMNSVRA.INF:error shelling UpdateNdisWanInfo."
  2842.                 goto ShellCodeError
  2843.             endif
  2844.             Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2845.                 Debug-Output "OEMNSVRA.INF:error returned by UpdateNdisWanInfo."
  2846.                 goto end
  2847.             endif
  2848.             Shell "" AddNDISWANToServiceGroupOrder
  2849.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2850.                Debug-Output "Cannot add NDISWAN to ServiceGroupOrder"
  2851.                goto ShellCodeError
  2852.             endif
  2853.             Shell "" UpdateAsyncMacParameters
  2854.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2855.                 Debug-Output "OEMNSVRA.INF:error shelling UpdateAsyncMacParameters."
  2856.                 goto ShellCodeError
  2857.             endif
  2858.             Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2859.                 Debug-Output "OEMNSVRA.INF:error returned by UpdateAsyncMacParameters."
  2860.                 goto end
  2861.             endif
  2862.             Shell "" UpdateAsyncMacStartType
  2863.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2864.                 Debug-Output "OEMNSVRA.INF:error shelling UpdateAsyncMacStartType."
  2865.                 goto ShellCodeError
  2866.             endif
  2867.             Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2868.                 Debug-Output "OEMNSVRA.INF:error returned by UpdateAsyncMacStartType."
  2869.                 goto end
  2870.             endif
  2871.             Shell "" UpgradeSelectedProtocols
  2872.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2873.                 Debug-Output "OEMNSVRA.INF:error shelling UpgradeSelectedProtocols."
  2874.                 goto ShellCodeError
  2875.             endif
  2876.             Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2877.                 Debug-Output "OEMNSVRA.INF:error returned by UpgradeSelectedProtocols."
  2878.                 goto end
  2879.             endif
  2880.             ifstr(i) $(!STF_STANDARDSERVERUPGRADE) == "YES"
  2881.                 OpenRegKey $(!REG_H_LOCAL) "" $(RasProtocolsKeyName) +
  2882.                                               $(!MAXIMUM_ALLOWED) KeyProtocols
  2883.                 ifstr $(KeyProtocols) != $(KeyNull)
  2884.                     set fDialin = FALSE
  2885.                     set TmpList = {}
  2886.                     GetRegValue $(KeyProtocols) "fNetbeuiAllowed" TmpList
  2887.                     ifint $(RegLastError) == 0
  2888.                         ifstr *($(TmpList), 4) == 1
  2889.                             set fDialin = TRUE
  2890.                         endif
  2891.                     endif
  2892.                     set TmpList = {}
  2893.                     ifstr(i) $(fDialin) == FALSE
  2894.                         GetRegValue $(KeyProtocols) "fTcpIpAllowed" TmpList
  2895.                         ifint $(RegLastError) == 0
  2896.                             ifstr *($(TmpList), 4) == 1
  2897.                                 set fDialin = TRUE
  2898.                             endif
  2899.                         endif
  2900.                     endif
  2901.                     set TmpList = {}
  2902.                     ifstr(i) $(fDialin) == FALSE
  2903.                         GetRegValue $(KeyProtocols) "fIpxAllowed" TmpList
  2904.                         ifint $(RegLastError) == 0
  2905.                             ifstr *($(TmpList), 4) == 1
  2906.                                 set fDialin = TRUE
  2907.                             endif
  2908.                         endif
  2909.                     endif
  2910.                     Debug-Output "OEMNSVRA.INF: Upgrade => Are dialin ports configured? "$(fDialin)
  2911.                     ifstr(i) $(fDialin) == TRUE
  2912.                         OpenRegKey $(!REG_H_LOCAL) "" $(RasSvrKeyName) +
  2913.                                                      $(!MAXIMUM_ALLOWED) KeySvr
  2914.                         ifstr $(KeySvr) != $(KeyNull)
  2915.                             set  RasStartValue = 2
  2916.                             GetRegValue $(KeySvr) "Start" StartList
  2917.                             ifint $(RegLastError) == 0
  2918.                                set RasStartValue = *($(StartList), 4)
  2919.                             endif
  2920.                             ifint $(RasStartValue) != 4
  2921.                                 Debug-Output "OEMNSVRA.INF: Changing RemoteAccess Start value to 2"
  2922.                                 SetRegValue $(KeySvr) {Start,$(NoTitle),$(!REG_VT_DWORD), 2}
  2923.                             endif
  2924.                             CloseRegKey $(KeySvr)
  2925.                         else
  2926.                             Debug-Output "OEMNSVRA.INF: error opening RemoteAccess service key"
  2927.                         endif
  2928.                     endif
  2929.                     CloseRegKey $(KeyProtocols)
  2930.                 else
  2931.                     Debug-Output "OEMNSVRA.INF: could not open RAS\Protocols key"
  2932.                 endif
  2933.                 OpenRegKey $(!REG_H_LOCAL) "" $(!NdisTapiKeyName)"\Parameters" $(!MAXIMUM_ALLOWED) ParamKey
  2934.                 Ifstr(i) $(ParamKey) != $(KeyNull)
  2935.                     SetRegValue $(ParamKey) {AsyncEventQueueSize, 0, $(!REG_VT_DWORD), 3072}
  2936.                     CloseRegKey $(ParamKey)
  2937.                 EndIf
  2938.             endif
  2939.             Shell "" UpgradeIpxInfo $(PORTSDLGHANDLE)
  2940.             Shell "" UpgradeIsdnInfo
  2941.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2942.                 Debug-Output "OEMNSVRA.INF:error shelling UpgradeIsdnInfo."
  2943.                 goto ShellCodeError
  2944.             endif
  2945.             Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2946.                 Debug-Output "OEMNSVRA.INF:error returned by UpgradeIsdnInfo."
  2947.                 set Error = $(UpgradeIsdnInfoError)
  2948.                 goto fatal
  2949.             endif
  2950.             Shell "" UpdatePerfmonInfo
  2951.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2952.                 Debug-Output "OEMNSVRA.INF:error shelling UpdatePerfmonInfo."
  2953.                 goto ShellCodeError
  2954.             endif
  2955.             Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2956.                 Debug-Output "OEMNSVRA.INF:error returned by UpdatePerfmonInfo."
  2957.                 goto end
  2958.             endif
  2959.             Shell "" UpdateCPList
  2960.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2961.                 Debug-Output "OEMNSVRA.INF:error shelling UpdateCPList."
  2962.                 goto ShellCodeError
  2963.             endif
  2964.             Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2965.                 Debug-Output "OEMNSVRA.INF:error returned by UpdateCPList."
  2966.                 goto end
  2967.             endif
  2968.             ifstr(i) $(!STF_PRODUCT) != "WINNT"
  2969.                 OpenRegKey $(!REG_H_LOCAL) "" $(!NdisTapiKeyName)"\Parameters" $(!MAXIMUM_ALLOWED) ParamKey
  2970.                 Ifstr(i) $(ParamKey) != $(KeyNull)
  2971.                     SetRegValue $(ParamKey) {AsyncEventQueueSize, 0, $(!REG_VT_DWORD), 3072}
  2972.                     CloseRegKey $(ParamKey)
  2973.                 EndIf
  2974.             EndIf
  2975.             Install RemoveRasGroup
  2976.             EndWait
  2977.             Ifint $(BillboardVisible) != 0
  2978.                 Shell "subroutn.inf" PopBillboard
  2979.                 Set BillboardVisible = 0
  2980.             Endif
  2981.         endif
  2982.         Shell "" UpdateSoftwareType
  2983.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2984.             Debug-Output "OEMNSVRA.INF:error shelling UpdateSoftwareType."
  2985.             goto ShellCodeError
  2986.         endif
  2987.         Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2988.             Debug-Output "OEMNSVRA.INF:error returned by UpdateSoftwareType."
  2989.             goto end
  2990.         endif
  2991.         SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMajorVersion)}
  2992.         SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMinorVersion)}
  2993.         SetRegValue $(KeyProduct) {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductRASDescription)}
  2994.         SetRegValue $(KeyProduct) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}
  2995.         CloseRegKey $(KeyProduct)
  2996.     else
  2997.         Set RegistryErrorIndex = $($R0)
  2998.         goto fatalregistry
  2999.     endif
  3000.     goto end
  3001. successful = +
  3002.     Ifstr(i) $(!NTN_InstallPhase) == primary
  3003.         goto installstep1
  3004.     else-ifstr(i) $(!NTN_InstallMode) == configure
  3005.         goto installstep1
  3006.     endif
  3007.     ifint $(NewNumDialin) != 0
  3008.        ifstr(i) $(!STF_GUI_UNATTENDED) != YES
  3009.             read-syms SuccessfulInstall$(!STF_LANGUAGE)
  3010.             shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "STATUS" $(Success)
  3011.        endif
  3012.     endif
  3013. installstep1 = +
  3014.     goto end
  3015. warning = +
  3016.     Shell $(subroutninf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  3017.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3018.     goto ShellCodeError
  3019.     endif
  3020.     ifstr(i) $($R1) == "OK"
  3021.        goto $(to)
  3022.     else-ifstr(i) $($R1) == "CANCEL"
  3023.        goto $(from)
  3024.     else
  3025.        Debug-Msg "Error Error Bad DLGEVENT"
  3026.        goto "end"
  3027.     endif
  3028. nonfatal = +
  3029.     Shell $(subroutninf) SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $(Error)
  3030.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3031.         goto ShellCodeError
  3032.     endif
  3033.     ifstr(i) $($R1) == "OK"
  3034.         goto $(from)
  3035.     else
  3036.         goto "end"
  3037.     endif
  3038. fatalregistry = +
  3039.     Shell $(!UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  3040.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3041.        Debug-Output "fatalregistry: shell to find RegistryErrorString failed."
  3042.        goto ShellCodeError
  3043.     endif
  3044.     ifstr(i) $(RasSpecificString) != ""
  3045.         set Error = $($R0)" - service "$(RasSpecificString)"."
  3046.     else
  3047.         set Error = $($R0)
  3048.     endif
  3049.     read-syms AbortMessage$(!STF_LANGUAGE)
  3050.     set Error = $(Error)$(!LF)$(!LF)$(AbortText)
  3051.     goto fatal
  3052. fatal =    +
  3053.     Shell $(subroutninf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  3054.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3055.         Debug-Output "fatal: shell to SetupMessage failed."
  3056.     goto ShellCodeError
  3057.     endif
  3058.     goto setfailed
  3059. ShellCodeError = +
  3060.     read-syms ShellCodeErrorMsg$(!STF_LANGUAGE)
  3061.     ui start "Error Message"
  3062.     goto setfailed
  3063. setfailed = +
  3064.     set CommonStatus = STATUS_FAILED
  3065.     ifstr(i) $(fRemoveRas) == TRUE
  3066.         set fRemoveRas = FALSE
  3067.         set from = setfailed
  3068.         set to   = end
  3069.         goto RemoveRas
  3070.     endif
  3071.     goto end
  3072. filecopycancel =+
  3073.     set CommonStatus = STATUS_USERCANCEL
  3074.     ifstr(i) $(fRemoveRas) == TRUE
  3075.         set fRemoveRas = FALSE
  3076.         set from = setfailed
  3077.         set to   = end
  3078.         goto RemoveRas
  3079.     endif
  3080. end = +
  3081.     ifstr(i) $(PORTSDLGHANDLE) != $(HandleNull)
  3082.         Debug-Output "Unloading RASCFG.DLL"
  3083.         FreeLibrary $(PORTSDLGHANDLE)
  3084.     endif
  3085.     Debug-Output "ending at last!!"
  3086.     goto term
  3087. term = +
  3088.     Debug-Output "OEMNSVRA.INF:term: CommonStatus "$(CommonStatus)
  3089.     Return $(CommonStatus)
  3090. [BindingsReview]
  3091.     set Option   = $($1)
  3092.     set SrcDir   = $($2)
  3093.     set AddCopy  = $($3)
  3094.     set DoCopy   = $($4)
  3095.     set DoConfig = $($5)
  3096.     set Language = $(!STF_LANGUAGE)
  3097.     set SaveInstallMode = $(!NTN_InstallMode)
  3098.     set !NTN_InstallMode = bind
  3099.     Shell "" InstallOption $(Language) $(Option) $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig)
  3100.     set !NTN_InstallMode = $(SaveInstallMode)
  3101.     set Status = $($R0)
  3102.     Return $(Status)
  3103. [SetRestoreConnectionTo1]
  3104.    Debug-Output "SetRestoreConnectionTo1 entry.."
  3105.    set KeyNull = ""
  3106.    set RestoreKeyName = "SYSTEM\CurrentControlSet\Control\networkprovider"
  3107.    OpenRegKey $(!REG_H_LOCAL) "" $(RestoreKeyName) $(!MAXIMUM_ALLOWED) KeyRestore
  3108.    Ifstr(i) $(KeyRestore) != $(KeyNull)
  3109.        SetRegValue $(KeyRestore) {RestoreConnection, 0, $(!REG_VT_DWORD), 1}
  3110.        CloseRegKey $(KeyRestore)
  3111.    else
  3112.        Debug-Output "SetRestoreConnectionTo1 error opening key. "$(RestoreKeyName)
  3113.    endif
  3114.    Debug-Output "SetRestoreConnectionTo1 exit."
  3115.    return
  3116. [InstallSoftwareAndService]
  3117.    set Status = STATUS_SUCCESSFUL
  3118.    set ThisOption = $($0)
  3119.    Debug-Output "InstallSoftwareAndService for "$(ThisOption)
  3120.    Shell $(!UtilityInf), AddSoftwareComponent, $(!Manufacturer), +
  3121.          $(!Product$(ThisOption)Name), $(!Product$(ThisOption)Name), +
  3122.          $(!Product$(ThisOption)DisplayName), +
  3123.          $(!RasInfName), $(!Product$(ThisOption)ImagePath), "autoserviceshare",+
  3124.          "", {}, "", $(!RasMsgDll), $(!RasEventTypeSupported)
  3125.    ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3126.        Debug-Output "InstallSoftware: AddSoftware bombed out for "$(ThisOption)
  3127.        goto InstallSoftwareError
  3128.    endif
  3129.    set RegistryErrorIndex = $($R0)
  3130.    Ifstr(i) $(RegistryErrorIndex) == SERVICE_ALREADY_EXISTS
  3131.        return $(Status)
  3132.    EndIf
  3133.    Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  3134.        CloseRegKey $($R1)
  3135.        CloseRegKey $($R2)
  3136.        CloseRegKey $($R3)
  3137.        CloseRegKey $($R4)
  3138.        CloseRegKey $($R5)
  3139.        goto InstallSoftwareError
  3140.    endif
  3141.    Set SoftProductKey    = $($R1)
  3142.    CloseRegKey $($R2)
  3143.    CloseRegKey $($R3)
  3144.    CloseRegKey $($R4)
  3145.    CloseRegKey $($R5)
  3146.    set NewValueList = +
  3147.        {{Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)},+
  3148.         {ServiceName,$(NoTitle),$(!REG_VT_SZ),+
  3149.          $(!Product$(ThisOption)Name)},+
  3150.         {SoftwareType,$(NoTitle),$(!REG_VT_SZ),+
  3151.          $(!Product$(ThisOption)SvcType)},+
  3152.         {Title,$(NoTitle),$(!REG_VT_SZ),$(!Product$(ThisOption)Title)},+
  3153.         {Description,$(NoTitle),$(!REG_VT_SZ),+
  3154.          $(!Product$(ThisOption)Description)},+
  3155.         {PathName,$(NoTitle),$(!REG_VT_SZ),+
  3156.          $(!Product$(ThisOption)ImagePath)},+
  3157.         {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMajorVersion)},+
  3158.         {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMinorVersion)},+
  3159.         {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)},+
  3160.         {Hidden,$(NoTitle),$(!REG_VT_DWORD),$(!HideComponent)}}
  3161.    Shell  $(!UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  3162.    ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3163.        Debug-Output "InstallSoftware: AddValueList bombed out for "$(ThisOption)
  3164.        goto InstallSoftwareError
  3165.    endif
  3166.    set RegistryErrorIndex = $($R0)
  3167.    CloseRegKey $(SoftProductKey)
  3168.    Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  3169.        goto InstallSoftwareError
  3170.    endif
  3171.    goto InstallSoftwareEnd
  3172. InstallSoftwareError =+
  3173.    read-syms ShellCodeErrorMsg$(!STF_LANGUAGE)
  3174.    ui start "Error Message"
  3175.    return STATUS_FAILED
  3176. InstallSoftwareEnd =+
  3177.    return $(Status)
  3178. [AddInfToReviewProgramsList]
  3179.     Debug-Output "AddInfToReviewPrograms: entry"
  3180.     set Status  = STATUS_FAILED
  3181.     set KeyNull = ""
  3182.     set NcpaKeyName = $(!NTN_SoftwareBase)"\Microsoft\Ncpa\CurrentVersion"
  3183.     set newList = {"OEMNSVRA.INF"}
  3184.     OpenRegKey $(!REG_H_LOCAL) "" $(NcpaKeyName) $(!MAXIMUM_ALLOWED) KeyNcpa
  3185.     Ifstr(i) $(KeyNcpa) != $(KeyNull)
  3186.         GetRegValue    $(KeyNcpa) "ReviewPrograms" TmpList
  3187.         ifint $(RegLastError) == 0
  3188.             Debug-Output "AddInf: old List "*($(TmpList), 4)
  3189.             ForListDo *($(TmpList),4)
  3190.                 ifstr(i) $($) != "OEMNSVRA.INF"
  3191.                     set newList = >($(newList), $($))
  3192.                 endif
  3193.             EndForListDo
  3194.             Debug-Output "OEMNSVRA.INF: AddInf: new List "$(newList)
  3195.             SetRegValue $(KeyNcpa) {ReviewPrograms, 0, +
  3196.                                     $(!REG_VT_MULTI_SZ),$(newList)}
  3197.             CloseRegKey $(KeyNcpa)
  3198.             Set Status = STATUS_SUCCESSFUL
  3199.         endif
  3200.     else
  3201.         Debug-Output "AddInfToReviewPrograms: error opening ncpa key."
  3202.     endif
  3203.     Debug-Output "AddInfToReviewPrograms: exit"
  3204.     return $(Status)
  3205. [RemoveInfFromReviewPrograms]
  3206.     Debug-Output "RemoveInfFromReviewPrograms: entry"
  3207.     set Status  = STATUS_FAILED
  3208.     set KeyNull = ""
  3209.     set NcpaKeyName = $(!NTN_SoftwareBase)"\Microsoft\Ncpa\CurrentVersion"
  3210.     set newList = {}
  3211.     OpenRegKey $(!REG_H_LOCAL) "" $(NcpaKeyName) $(!MAXIMUM_ALLOWED) KeyNcpa
  3212.     Ifstr(i) $(KeyNcpa) != $(KeyNull)
  3213.         GetRegValue    $(KeyNcpa) "ReviewPrograms" TmpList
  3214.         ifint $(RegLastError) == 0
  3215.             Debug-Output "RemoveInf: old List "*($(TmpList), 4)
  3216.             ForListDo *($(TmpList),4)
  3217.                 ifstr(i) $($) != "OEMNSVRA.INF"
  3218.                     set newList = >($(newList), $($))
  3219.                 endif
  3220.             EndForListDo
  3221.             Debug-Output "AddInf: new List "$(newList)
  3222.             SetRegValue $(KeyNcpa) {ReviewPrograms, 0, +
  3223.                                     $(!REG_VT_MULTI_SZ),$(newList)}
  3224.             CloseRegKey $(KeyNcpa)
  3225.             Set Status = STATUS_SUCCESSFUL
  3226.         endif
  3227.     else
  3228.         Debug-Output "RemoveInfFromReviewPrograms: error opening ncpa key."
  3229.     endif
  3230.     Debug-Output "RemoveInfFromReviewPrograms: exit"
  3231.     return $(Status)
  3232. [InstallResources]
  3233.     set STF_VITAL = NO    
  3234.     Debug-Output  "In Copying Files"
  3235.     ifstr(i) $(AddCopy) == "YES"
  3236.         CreateDir $(RasDir)
  3237.         AddSectionFilesToCopyList Files-Resource $(SourceDir) $(!STF_WINDOWSSYSPATH)
  3238.         AddSectionKeyFileToCopyList Files-Ras-Inf "rasico" $(SourceDir) $(ProductPath)
  3239.         AddSectionKeyFileToCopyList Files-Ras-Inf "rasread" $(SourceDir) $(ProductPath)
  3240.         ifstr(i) $(!NTN_InstallMode) == "Install"
  3241.             AddSectionKeyFileToCopyList Files-Ras-Inf "modem" $(SourceDir) $(ProductPath)
  3242.             AddSectionKeyFileToCopyList Files-Ras-Inf "pad" $(SourceDir) $(ProductPath)
  3243.             AddSectionKeyFileToCopyList Files-Ras-Inf "switch" $(SourceDir) $(ProductPath)
  3244.             AddSectionKeyFileToCopyList Files-Ras-Scp "cis" $(SourceDir) $(ProductPath)
  3245.             AddSectionKeyFileToCopyList Files-Ras-Scp "slip" $(SourceDir) $(ProductPath)
  3246.             AddSectionKeyFileToCopyList Files-Ras-Scp "slipmenu" $(SourceDir) $(ProductPath)
  3247.             AddSectionKeyFileToCopyList Files-Ras-Scp "pppmenu" $(SourceDir) $(ProductPath)
  3248.             AddSectionKeyFileToCopyList Files-Ras-Scp "scriptdoc" $(SourceDir) $(ProductPath)
  3249.         else-Ifstr(i) $(!NTN_InstallMode) == "Update"
  3250.             forlistdo {modem.new, pad.new, switch.new, cis.new, slip.new, slipmenu.new, pppmenu.new, script.doc}
  3251.                    LibraryProcedure Status, $(!LIBHANDLE), DelFile +
  3252.                                             $(!STF_WINDOWSSYSPATH)"\RAS\"$($)
  3253.             set STF_RENAME = "MODEM.NEW"
  3254.             AddSectionKeyFileToCopyList Files-Ras-Inf "modem" $(SourceDir) $(ProductPath)
  3255.             set STF_RENAME = "PAD.NEW"
  3256.             AddSectionKeyFileToCopyList Files-Ras-Inf "pad" $(SourceDir) $(ProductPath)
  3257.             set STF_RENAME = "SWITCH.NEW"
  3258.             AddSectionKeyFileToCopyList Files-Ras-Inf "switch" $(SourceDir) $(ProductPath)
  3259.             set STF_RENAME = "CIS.SCP"
  3260.             AddSectionKeyFileToCopyList Files-Ras-Scp "cis" $(SourceDir) $(ProductPath)
  3261.             set STF_RENAME = "SLIP.SCP"
  3262.             AddSectionKeyFileToCopyList Files-Ras-Scp "slip" $(SourceDir) $(ProductPath)
  3263.             set STF_RENAME = "SLIPMENU.SCP"
  3264.             AddSectionKeyFileToCopyList Files-Ras-Scp "slipmenu" $(SourceDir) $(ProductPath)
  3265.             set STF_RENAME = "PPPMENU.SCP"
  3266.             AddSectionKeyFileToCopyList Files-Ras-Scp "pppmenu" $(SourceDir) $(ProductPath)
  3267.             set STF_RENAME = "SCRIPT.DOC"
  3268.             AddSectionKeyFileToCopyList Files-Ras-Scp "scriptdoc" $(SourceDir) $(ProductPath)
  3269.             set STF_RENAME = ""
  3270.         endif
  3271.     endif
  3272.     ifstr(i) $(!NTN_InstallMode) == "Update"
  3273.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  3274.        CopyFilesInCopyList
  3275.     else-ifstr(i) $(DoCopy) == "YES"
  3276.         set !STF_NCPA_FLUSH_COPYLIST = TRUE
  3277.         CopyFilesInCopyList
  3278.     endif
  3279.     Debug-Output  "Done Copying Files"
  3280.     exit
  3281. [RemoveResources]
  3282.     Debug-Output "In removing infs and dll"
  3283.     set RemoveList = {}
  3284.     set RenameList = {}
  3285.     set RemoveList = >($(RemoveList), #(Files-RemoveList, MODEMINF, 1))
  3286.     set RemoveList = >($(RemoveList), #(Files-RemoveList, PADINF, 1))
  3287.     set RemoveList = >($(RemoveList), #(Files-RemoveList, SWITCHINF, 1))
  3288.     set RemoveList = >($(RemoveList), #(Files-RemoveList, RASSETUPHLP, 1))
  3289.     set RenameList = >($(RenameList), #(Files-RemoveList, RASRESDLL, 1))
  3290.     set RenameList = >($(RenameList), #(Files-RemoveList, RASCFGDLL, 1))
  3291.     set RenameList = >($(RenameList), #(Files-RemoveList, RASFIL32DLL, 1))
  3292.     ForListDo $(RemoveList)
  3293.         Debug-Output "Removing "$($)
  3294.         LibraryProcedure Status , $(!LIBHANDLE), DelFile $($)
  3295.         Debug-Output "Status is "$(Status)
  3296.     EndForListDo
  3297.     ForListDo $(RenameList)
  3298.         Split-String $($) "\" FilePath
  3299.         QueryListSize PathLen $(FilePath)
  3300.         Split-String *($(FilePath),$(PathLen)) "." FullFileName
  3301.         Set FileName = *($(FullFileName),1)
  3302.         Debug-Output "FileName is "$(FileName)
  3303.         LibraryProcedure STATUS, $(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\"$(FileName)".old"
  3304.         Debug-Output "CheckFile Status = "$(STATUS)
  3305.         ifstr(i) $(STATUS) == YES
  3306.             LibraryProcedure STATUS, $(!LIBHANDLE), DelFile $(!STF_WINDOWSSYSPATH)"\"$(FileName)".old"
  3307.             Debug-Output "Delfile Status = "$(STATUS)
  3308.         endif
  3309.         Debug-Output "Renaming from "$($)
  3310.         Debug-Output "Renaming to "$(!STF_WINDOWSSYSPATH)"\"$(FileName)".old"
  3311.         LibraryProcedure Status1 , $(!LIBHANDLE), RenFile $($), $(!STF_WINDOWSSYSPATH)"\"$(FileName)".old"
  3312.         Debug-Output "Status is "$(Status1)
  3313.         AddFileToDeleteList $(!STF_WINDOWSSYSPATH)"\"$(FileName)".old"
  3314.     EndForListDo
  3315.     exit
  3316. [InstallRasFiles]
  3317.     set STF_VITAL = NO
  3318.     Debug-Output  "In InstallRasFiles Copying Files"
  3319.     Debug-Output  "ServerInstalled "$(ServerInstalled)
  3320.     Debug-Output  "ClientInstalled "$(ClientInstalled)
  3321.     ifstr(i) $(DoAdmin) == TRUE
  3322.         AddSectionFilesToCopyList Files-Ras-Admin $(SourceDir) +
  3323.                   $(!STF_WINDOWSSYSPATH)
  3324.         ifstr(i) $(DoAdminOnly) == TRUE
  3325.             goto InstallRasFiles1
  3326.         endif
  3327.     endif
  3328.     ifstr(i) $(DoClient) == TRUE
  3329.         AddSectionFilesToCopyList Files-Ras-Client $(SourceDir) +
  3330.                  $(!STF_WINDOWSSYSPATH)
  3331.     endif
  3332.     ifstr(i) $(DoServer) == TRUE
  3333.         AddSectionFilesToCopyList Files-Ras-Server $(SourceDir) +
  3334.                  $(!STF_WINDOWSSYSPATH)
  3335.     endif
  3336.     ifstr(i) $(!NTN_InstallMode) == "Update"
  3337.         AddSectionFilesToCopyList Files-Ras-Common $(SourceDir) +
  3338.                      $(!STF_WINDOWSSYSPATH)
  3339.         AddSectionFilesToCopyList Files-Ras-Drivers $(SourceDir) +
  3340.                      $(!STF_WINDOWSSYSPATH)\drivers
  3341.     else
  3342.         ifstr(i) $(ServerInstalled) == FALSE
  3343.             ifstr(i) $(ClientInstalled) == FALSE
  3344.                 AddSectionFilesToCopyList Files-Ras-Common $(SourceDir) +
  3345.                              $(!STF_WINDOWSSYSPATH)
  3346.                 AddSectionFilesToCopyList Files-Ras-Drivers $(SourceDir) +
  3347.                              $(!STF_WINDOWSSYSPATH)\drivers
  3348.             endif
  3349.         endif
  3350.     endif
  3351. InstallRasFiles1 = +
  3352.     ifstr(i) $(!NTN_InstallMode) == "Update"
  3353.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  3354.        CopyFilesInCopyList
  3355.     else
  3356.        ifstr(i) $(DoCopy) == "YES"
  3357.           set !STF_NCPA_FLUSH_COPYLIST = TRUE
  3358.           CopyFilesInCopyList
  3359.        endif
  3360.     endif
  3361.     Debug-Output  "Done Copying Files"
  3362.     exit
  3363. [RemoveRasFiles]
  3364.     ifstr(i) $(!NTN_InstallMode) == install
  3365.         ifstr(i) $(DoCopy) == "NO"
  3366.            Exit
  3367.         endif
  3368.     endif
  3369.     set RemoveList = {}
  3370.     set RenameList = {}
  3371.     set fCommonRemoved = FALSE
  3372.     ifstr(i) $(DoServer) == TRUE
  3373.        set fCommonRemoved = TRUE
  3374.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASGTWYDLL, 1))
  3375.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASGPRXYDLL, 1))
  3376.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASSPRXYEXE, 1))
  3377.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASSRVEXE, 1))
  3378.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCTRSDLL, 1))
  3379.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCTRSINI, 1))
  3380.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCTRNMH, 1))
  3381.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASSAUTHDLL, 1))
  3382.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASADMINDLL, 1))
  3383.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASMANDLL, 1))
  3384.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASMANEXE, 1))
  3385.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASMSGDLL, 1))
  3386.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASMXSDLL, 1))
  3387.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASSERDLL, 1))
  3388.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASIPXCPDLL, 1))
  3389.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASPPPDLL, 1))
  3390.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASPPPENDLL, 1))
  3391.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASPAPDLL, 1))
  3392.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCHAPDLL, 1))
  3393.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASSPAPDLL, 1))
  3394.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASIPCPDLL, 1))
  3395.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASIPHLPDLL, 1))
  3396.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASNBFCPDLL, 1))
  3397.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCCPDLL, 1))
  3398.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCBCPDLL, 1))
  3399.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASNBIPCDLL, 1))
  3400.        set RenameList = >($(RenameList), #(Files-RemoveList, ASYNCMACSYS, 1))
  3401.        set RenameList = >($(RenameList), #(Files-RemoveList, NDISWANSYS, 1))
  3402.        set RenameList = >($(RenameList), #(Files-RemoveList, RASARPSYS, 1))
  3403.     endif
  3404.     ifstr(i) $(DoClient) == TRUE
  3405.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASDIALEXE, 1))
  3406.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASPHONEHLP, 1))
  3407.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCAUTHDLL, 1))
  3408.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASAPI32DLL, 1))
  3409.        ifstr(i) $(fCommonRemoved) == FALSE
  3410.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASMANDLL, 1))
  3411.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASMANEXE, 1))
  3412.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASMSGDLL, 1))
  3413.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASMXSDLL, 1))
  3414.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASSERDLL, 1))
  3415.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASIPXCPDLL, 1))
  3416.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASPPPDLL, 1))
  3417.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASPPPENDLL, 1))
  3418.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASPAPDLL, 1))
  3419.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCHAPDLL, 1))
  3420.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASSPAPDLL, 1))
  3421.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASIPCPDLL, 1))
  3422.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASIPHLPDLL, 1))
  3423.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASNBFCPDLL, 1))
  3424.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCCPDLL, 1))
  3425.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCBCPDLL, 1))
  3426.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASNBIPCDLL, 1))
  3427.            set RenameList = >($(RenameList), #(Files-RemoveList, ASYNCMACSYS, 1))
  3428.        set RenameList = >($(RenameList), #(Files-RemoveList, NDISWANSYS, 1))
  3429.            set RenameList = >($(RenameList), #(Files-RemoveList, RASARPSYS, 1))
  3430.        endif
  3431.     endif
  3432.     ifstr(i) $(DoAdmin) == TRUE
  3433.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASADMINHLP, 1))
  3434.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASGLOSSHLP, 1))
  3435.     endif
  3436.     ForListDo $(RemoveList)
  3437.         Debug-Output "Removing "$($)
  3438.         LibraryProcedure Status , $(!LIBHANDLE), DelFile $($)
  3439.         Debug-Output "Status is "$(Status)
  3440.     EndForListDo
  3441.     ForListDo $(RenameList)
  3442.         Split-String $($) "\" FilePath
  3443.         QueryListSize PathLen $(FilePath)
  3444.         Split-String *($(FilePath),$(PathLen)) "." FullFileName
  3445.         Set FileName = *($(FullFileName),1)
  3446.         Debug-Output "FileName is "$(FileName)
  3447.         LibraryProcedure STATUS, $(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\DRIVERS\"$(FileName)".old"
  3448.         Debug-Output "CheckFile Status = "$(STATUS)
  3449.         ifstr(i) $(STATUS) == YES
  3450.             LibraryProcedure STATUS, $(!LIBHANDLE), DelFile $(!STF_WINDOWSSYSPATH)"\DRIVERS\"$(FileName)".old"
  3451.             Debug-Output "Delfile Status = "$(STATUS)
  3452.         endif
  3453.         Debug-Output "Renaming from "$($)
  3454.         Debug-Output "Renaming to "$(!STF_WINDOWSSYSPATH)"\DRIVERS\"$(FileName)".old"
  3455.         LibraryProcedure Status1 , $(!LIBHANDLE), RenFile $($), $(!STF_WINDOWSSYSPATH)"\DRIVERS\"$(FileName)".old"
  3456.         Debug-Output "Status is "$(Status1)
  3457.         AddFileToDeleteList $(!STF_WINDOWSSYSPATH)"\DRIVERS\"$(FileName)".old"
  3458.     EndForListDo
  3459.     exit
  3460. [RemoveRasGroup]
  3461.     Debug-Output "Removing icons from "$(RasGroup)
  3462.     CreateCommonProgManGroup $(RasGroup) ""
  3463.     RemoveCommonProgManGroup $(RasGroup)
  3464.     exit
  3465. [AddNDISWANToServiceGroupOrder]
  3466.     set GroupOrderName = "SYSTEM\CurrentControlSet\Control\ServiceGroupOrder"
  3467.     OpenRegKey $(!REG_H_LOCAL) "" $(GroupOrderName) $(!MAXIMUM_ALLOWED) KeyGroup
  3468.     set OldList = {}
  3469.     Ifstr(i) $(KeyGroup) != $(KeyNull)
  3470.         GetRegValue  $(KeyGroup) "List" TmpList
  3471.         ifint $(RegLastError) == 0
  3472.             ForListDo *($(TmpList), 4)
  3473.                 set OldList = >($(OldList), $($))
  3474.             EndForListDo
  3475.         endif
  3476.         Debug-Output "AddNDISWANToServiceGroupOrder current list "$(OldList)
  3477.         Ifcontains(i) "NDISWAN" not-in $(OldList)
  3478.             set NewGroupList = {}
  3479.             ForListDo $(OldList)
  3480.                 set NewGroupList = >($(NewGroupList), $($))
  3481.                 ifstr(i) $($) == "NDIS"
  3482.                     set NewGroupList = >($(NewGroupList), "NDISWAN" )
  3483.                 endif
  3484.             EndForListDo
  3485.             Debug-Output "AddNDISWANToServiceGroupOrder new list "$(NewGroupList)
  3486.             SetRegValue $(KeyGroup) {List, 0,$(!REG_VT_MULTI_SZ),$(NewGroupList)}
  3487.         endif
  3488.         CloseRegKey $(KeyGroup)
  3489.     else
  3490.         Debug-Output "AddNDISWANToServiceGroupOrder error opening ServiceGroupOrder key."
  3491.     endif
  3492.     return
  3493. [CheckRasInstalled]
  3494.     set MAXIMUM_ALLOWED   = 33554432
  3495.     set ProductKeyName = $(!NTN_SoftwareBase)"\Microsoft\RAS\CurrentVersion"
  3496.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  3497.     Ifstr $(KeyProduct) != ""
  3498.         CloseRegKey $(KeyProduct)
  3499.         return "TRUE"
  3500.     else
  3501.         return "FALSE"
  3502. [QueryComponentsInstalled]
  3503.     Set Status            =    STATUS_FAILED
  3504.     Set ValueName         =    ""
  3505.     Set InstalledList     =    {}
  3506.     Set InstalledFlags    =    {}
  3507.     Set TmpList           =    {}
  3508.     Set KeyNull           =    ""
  3509.     Set NumberOfComps     =    0
  3510.     Set RasKeyName        =    $($0)
  3511.     Debug-Output "QueryComponentsInstalled: "$(RasKeyName)
  3512.     OpenRegKey $(!REG_H_LOCAL) "" $(RasKeyName) $(!MAXIMUM_ALLOWED) KeyProduct
  3513.     Ifstr(i) $(KeyProduct) != $(KeyNull)
  3514.         GetRegValue    $(KeyProduct) "RasComponents" TmpList
  3515.         Debug-Output "QueryComponentsInstalled: "$(TmpList)
  3516.         ForListDo *($(TmpList),4)
  3517.             set InstalledList = >($(InstalledList), $($))
  3518.         EndForListDo
  3519.         CloseRegKey $(KeyProduct)
  3520.         Ifcontains(i) "Server" in $(InstalledList)
  3521.             Set InstalledFlags = >($(InstalledFlags), TRUE)
  3522.         else
  3523.             Set InstalledFlags = >($(InstalledFlags), FALSE)
  3524.         endif
  3525.         Ifcontains(i) "Client" in $(InstalledList)
  3526.             Set InstalledFlags = >($(InstalledFlags), TRUE)
  3527.         else
  3528.             Set InstalledFlags = >($(InstalledFlags), FALSE)
  3529.         endif
  3530.         Ifcontains(i) "Admin" in $(InstalledList)
  3531.             Set InstalledFlags = >($(InstalledFlags), TRUE)
  3532.         else
  3533.             Set InstalledFlags = >($(InstalledFlags), FALSE)
  3534.         endif
  3535.         QueryListSize NumberOfComps $(InstalledList)
  3536.         ifint $(NumberOfComps) == 1
  3537.             Ifcontains(i) "Server" in $(InstalledList)
  3538.                 Set InstalledFlags = >($(InstalledFlags), TRUE)
  3539.             else
  3540.                 Set InstalledFlags = >($(InstalledFlags), FALSE)
  3541.             endif
  3542.             Ifcontains(i) "Client" in $(InstalledList)
  3543.                 Set InstalledFlags = >($(InstalledFlags), TRUE)
  3544.             else
  3545.                 Set InstalledFlags = >($(InstalledFlags), FALSE)
  3546.             endif
  3547.             Ifcontains(i) "Admin" in $(InstalledList)
  3548.                 Set InstalledFlags = >($(InstalledFlags), TRUE)
  3549.             else
  3550.                 Set InstalledFlags = >($(InstalledFlags), FALSE)
  3551.             endif
  3552.         else
  3553.             Set InstalledFlags = >($(InstalledFlags), FALSE)
  3554.             Set InstalledFlags = >($(InstalledFlags), FALSE)
  3555.             Set InstalledFlags = >($(InstalledFlags), FALSE)
  3556.         endif
  3557.         Set Status = STATUS_SUCCESSFUL
  3558.     Else
  3559.        Set Status = STATUS_NOT_FOUND
  3560.     EndIf
  3561.     Debug-Output "QueryComponentsInstalled: "$(InstalledList)
  3562.     Return $(Status) $(InstalledList) $(InstalledFlags)
  3563. [UpdateComponentsInstalled]
  3564.     Set Status          =    STATUS_FAILED
  3565.     Set InstalledList   =    $($0)
  3566.     Set RasKeyName      =    $($1)
  3567.     Set KeyNull         =    ""
  3568.     Debug-Output "UpdateComponentsInstalled: "$(RasKeyName)
  3569.     OpenRegKey $(!REG_H_LOCAL) "" $(RasKeyName) $(!MAXIMUM_ALLOWED) KeyProduct
  3570.     Ifstr(i) $(KeyProduct) != $(KeyNull)
  3571.         SetRegValue $(KeyProduct) {RasComponents, 0,$(!REG_VT_MULTI_SZ),$(InstalledList)}
  3572.         CloseRegKey $(KeyProduct)
  3573.         Set Status = STATUS_SUCCESSFUL
  3574.     else
  3575.         Set Status = STATUS_FAILED
  3576.     endif
  3577.     return $(Status)
  3578. [GetNetworkAccess]
  3579.     set Status          = STATUS_SUCCESSFUL
  3580.     Set KeyNull         = ""
  3581.     set NbfNetAccess   = 0
  3582.     set TcpIpNetAccess = 0
  3583.     set IpxNetAccess   = 0
  3584.     set RasProtocolsKeyName = $(!NTN_SoftwareBase)"\Microsoft\RAS\PROTOCOLS"
  3585.     Debug-Output "GetNetworkAccess entry"
  3586.     set ProtocolKeyName = $(RasProtocolsKeyName)"\NBF"
  3587.     OpenRegKey $(!REG_H_LOCAL) "" $(ProtocolKeyName) $(!MAXIMUM_ALLOWED) KeyProtocol
  3588.     Ifstr(i) $(KeyProtocol) != $(KeyNull)
  3589.        GetRegValue $(KeyProtocol), "NetBiosGatewayEnabled" NetworkAccess
  3590.        ifint $(RegLastError) == 0
  3591.            set NbfNetAccess = *($(NetworkAccess), 4)
  3592.        endif
  3593.        CloseRegKey $(KeyProtocol)
  3594.     else
  3595.        Debug-Output "GetNetworkAccess:error opening key "$(ProtocolKeyName)
  3596.     endif
  3597.     set ProtocolKeyName = $(RasProtocolsKeyName)"\IP"
  3598.     OpenRegKey $(!REG_H_LOCAL) "" $(ProtocolKeyName) $(!MAXIMUM_ALLOWED) KeyProtocol
  3599.     Ifstr(i) $(KeyProtocol) != $(KeyNull)
  3600.        GetRegValue $(KeyProtocol), "AllowNetworkAccess" NetworkAccess
  3601.        ifint $(RegLastError) == 0
  3602.            set TcpIpNetAccess = *($(NetworkAccess), 4)
  3603.        endif
  3604.        CloseRegKey $(KeyProtocol)
  3605.     else
  3606.        Debug-Output "GetNetworkAccess:error opening key "$(ProtocolKeyName)
  3607.     endif
  3608.     set ProtocolKeyName = $(RasProtocolsKeyName)"\IPX"
  3609.     OpenRegKey $(!REG_H_LOCAL) "" $(ProtocolKeyName) $(!MAXIMUM_ALLOWED) KeyProtocol
  3610.     Ifstr(i) $(KeyProtocol) != $(KeyNull)
  3611.        GetRegValue $(KeyProtocol), "AllowNetworkAccess" NetworkAccess
  3612.        ifint $(RegLastError) == 0
  3613.            set IpxNetAccess = *($(NetworkAccess), 4)
  3614.        endif
  3615.        CloseRegKey $(KeyProtocol)
  3616.     else
  3617.        Debug-Output "GetNetworkAccess:error opening key "$(ProtocolKeyName)
  3618.     endif
  3619.     Debug-Output "GetNetworkAccess exit"
  3620.     return $(Status) $(NbfNetAccess) $(TcpIpNetAccess) $(IpxNetAccess)
  3621. [IsNdisWanBHAdapterInstalled]
  3622.     set Status      = STATUS_FAILED
  3623.     Set KeyNull     = ""
  3624.     Debug-Output "IsNdisWanBHAdapterInstalled entry"
  3625.     set NetworkCardKey = $(KeyNull)
  3626.     OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) $(!MAXIMUM_ALLOWED) NetworkCardKey
  3627.     Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  3628.         set NetcardsList = {}
  3629.         EnumRegKey $(NetworkCardKey) NetcardsList
  3630.         Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  3631.            Debug-Output "IsNdisWanBHAdapterInstalled: EnumRegKey failed."
  3632.            goto IsNdisWanBHAdapterInstalledEnd
  3633.         endif
  3634.         ForListDo $(NetcardsList)
  3635.            set KeyName = *($($),1)
  3636.            set Card = $(KeyNull)
  3637.            OpenRegKey $(NetworkCardKey) "" $(KeyName) $(!MAXIMUM_ALLOWED) Card
  3638.            ifstr $(Card) == $(KeyNull)
  3639.                Debug-Output "IsNdisWanBHAdapterInstalled: could not open netcard key "$(KeyName)
  3640.            else
  3641.                GetRegValue $(Card), "ProductName" ProductNameInfo
  3642.                Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  3643.                   Debug-Output "IsNdisWanBHAdapterInstalled: ProductName not found."
  3644.                else
  3645.                   set CardProductName = *($(ProductNameInfo), 4)
  3646.                   Debug-Output "IsNdisWanBHAdapterInstalled: ProductName. "$(CardProductName)
  3647.                   ifstr(i) $(CardProductName) == $(!ProductNDISWANName)
  3648.                        set Status = STATUS_SUCCESSFUL
  3649.                        CloseRegKey $(Card)
  3650.                        goto IsNdisWanBHAdapterInstalledEnd
  3651.                   endif
  3652.                endif
  3653.                CloseRegKey $(Card)
  3654.            endif
  3655.         EndForListDo
  3656.     else
  3657.         Debug-Output "IsNdisWanBHAdapterInstalled: failed to open "$(!NetworkCardKeyName)
  3658.     endif
  3659. IsNdisWanBHAdapterInstalledEnd =+
  3660.     ifstr(i) $(NetworkCardKey) != $(KeyNull)
  3661.         CloseRegKey $(NetworkCardKey)
  3662.     endif
  3663.     Debug-Output "IsNdisWanBHAdapterInstalled exit"
  3664.     Return $(Status)
  3665. [InstallNdisWanBHAdapter]
  3666.     set Status = STATUS_FAILED
  3667.     set ThisOption = NDISWAN
  3668.     Debug-Output "InstallNdisWanBHAdapter entry"
  3669.     Shell "utility.inf", AddHardwareComponent, +
  3670.           $(!Product$(ThisOption)Name),$(!RasInfName),+
  3671.           $(!Product$(ThisOption)KeyName)
  3672.     ifint $($R4) != -1
  3673.         Set !NETCARD_LIST = >($(!NETCARD_LIST), +
  3674.                              {$(!Product$(ThisOption)Name),+
  3675.                              $(!NetworkCardKeyName)"\"$($R4)})
  3676.     endif
  3677.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3678.        Debug-Output "InstallNdisWanBHAdapter:Shell error"
  3679.        goto InstallNdisWanBHAdapterEnd
  3680.     endif
  3681.     set RegistryErrorIndex = $($R0)
  3682.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  3683.         Debug-Output "InstallNdisWanBHAdapter:Registry error: add hardware component"
  3684.         CloseRegKey $($R1)
  3685.         CloseRegKey $($R2)
  3686.         CloseRegKey $($R3)
  3687.         goto InstallNdisWanBHAdapterEnd
  3688.     endif
  3689.     set KeyNetcard    = $($R1)
  3690.     set KeyParameters = $($R3)
  3691.     set KeyAdapterRules = $($R2)
  3692.     set AdapterNumber = $($R4)
  3693.     set NewValueList = +
  3694.         {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(!Manufacturer)},+
  3695.          {Title,$(NoTitle),$(!REG_VT_SZ),+
  3696.           "["$($R4)"] "$(!Product$(ThisOption)Title)},+
  3697.          {Description,$(NoTitle),$(!REG_VT_SZ),+
  3698.           $(!Product$(ThisOption)Description)},+
  3699.          {ProductName,$(NoTitle),$(!REG_VT_SZ),+
  3700.           $(!Product$(ThisOption)Name)},+
  3701.          {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  3702.          {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)},+
  3703.          {Hidden,$(NoTitle),$(!REG_VT_DWORD),1}}
  3704.     Shell  "utility.inf", AddValueList, $(KeyNetcard), $(NewValueList)
  3705.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3706.         Debug-Output "InstallNdisWanBHAdapter: ShellCode error"
  3707.         goto InstallNdisWanBHAdapterEnd
  3708.     endif
  3709.     CloseRegKey $(KeyNetcard)
  3710.     set TempProdName = """"$(!Product$(ThisOption)Name)$(AdapterNumber)""""
  3711.     set TempBindForm = $(TempProdName)$(!NetRuleHardwareBHBindForm)
  3712.     set NewValueList = +
  3713.         {{type,$(NoTitle),$(!REG_VT_SZ),+
  3714.           $(!NetRuleHardwareBHType)},+
  3715.          {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  3716.          {class,$(NoTitle),$(!REG_VT_MULTI_SZ),+
  3717.           $(!NetRuleHardwareBHClass)}, +
  3718.          {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}, +
  3719.          {Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)}}
  3720.     Shell  "utility.inf", AddValueList, $(KeyAdapterRules), $(NewValueList)
  3721.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3722.         Debug-Output "InstallNdisWanBHAdapter: ShellCode error"
  3723.         goto InstallNdisWanBHAdapterEnd
  3724.     endif
  3725.     set RegistryErrorIndex = $($R0)
  3726.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  3727.         Debug-Output "InstallNdisWanBHAdapter:Registry error: add hardware component"
  3728.         CloseRegKey $(KeyParameters)
  3729.         CloseRegKey $(KeyAdapterRules)
  3730.         goto InstallNdisWanBHAdapterEnd
  3731.     endif
  3732.     CloseRegKey $(KeyAdapterRules)
  3733.     CloseRegKey $(KeyParameters)
  3734.     set Status = STATUS_SUCCESSFUL
  3735. InstallNdisWanBHAdapterEnd =+
  3736.     Debug-Output "InstallNdisWanBHAdapter exit"
  3737.     return $(Status)
  3738. [InstallRasArpService]
  3739.     set Status = STATUS_SUCCESSFUL
  3740.     set KeyNull = ""
  3741.     Debug-Output "InstallRasArpService entry"
  3742.     OpenRegKey $(!REG_H_LOCAL) "" $(!RasArpKeyName) $(!MAXIMUM_ALLOWED) KeyService
  3743.     Ifstr(i) $(KeyService) == $(KeyNull)
  3744.         Shell "utility.inf", CreateService, $(!ProductRASARPName), +
  3745.             $(!ProductRASARPDisplayName), +
  3746.             $(!ProductRASARPImagePath), +
  3747.             "kernelautostart", "PNP_TDI", {"TCPIP"}, ""
  3748.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3749.             Debug-Output "OEMNSVRA.INF: InstallRasArpService : ShellCode error"
  3750.             return STATUS_FAILED
  3751.         endif
  3752.         set RegistryErrorIndex = $($R0)
  3753.         CloseRegKey $($R1)
  3754.         CloseRegKey $($R2)
  3755.         CloseRegKey $($R3)
  3756.         Ifstr(i) $(RegistryErrorIndex) == SERVICE_ALREADY_EXISTS
  3757.            return $(Status)
  3758.         EndIf
  3759.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  3760.             Debug-Output "OEMNSVRA.INF: InstallRasArpService: Registry error create service"
  3761.             return STATUS_FAILED
  3762.         endif
  3763.     endif
  3764.     Ifstr(i) $(KeyService) != $(KeyNull)
  3765.         CloseRegKey $(KeyService)
  3766.     endif
  3767.     Debug-Output "InstallRasArpService exit"
  3768.     return $(Status)
  3769. [RemoveRasArpService]
  3770.     set Status = STATUS_SUCCESSFUL
  3771.     set KeyNull = ""
  3772.     Debug-Output "RemoveRasArpService entry"
  3773.     OpenRegKey $(!REG_H_LOCAL) "" $(!RasArpKeyName) $(!MAXIMUM_ALLOWED) KeyService
  3774.     Ifstr(i) $(KeyService) != $(KeyNull)
  3775.         Shell "utility.inf", RemoveService $(!ProductRASARPName) "YES"
  3776.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3777.             Debug-Output "OEMNSVRA.INF: RemoveRasArpService : ShellCode error"
  3778.             return STATUS_FAILED
  3779.         endif
  3780.         set RegistryErrorIndex = $($R0)
  3781.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  3782.             Debug-Output "OEMNSVRA.INF: RemoveRasArpService: Registry error: "
  3783.             return STATUS_FAILED
  3784.         endif
  3785.         CloseRegKey $(KeyService)
  3786.     endif
  3787.     Debug-Output "RemoveRasArpService exit"
  3788.     return $(Status)
  3789. [InstallRasAcdService]
  3790.     set Status = STATUS_SUCCESSFUL
  3791.     set KeyNull = ""
  3792.     Debug-Output "InstallRasAcdService entry"
  3793.     OpenRegKey $(!REG_H_LOCAL) "" $(!RasAcdKeyName) $(!MAXIMUM_ALLOWED) KeyService
  3794.     Ifstr(i) $(KeyService) == $(KeyNull)
  3795.         Shell "utility.inf", CreateService, $(!ProductRASACDName), +
  3796.             $(!ProductRASACDDisplayName), +
  3797.             $(!ProductRASACDImagePath), +
  3798.             "kernelautostart", "Streams Drivers", {}, ""
  3799.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3800.             Debug-Output "OEMNSVRA.INF: InstallRasArpService : ShellCode error"
  3801.             return STATUS_FAILED
  3802.         endif
  3803.         set RegistryErrorIndex = $($R0)
  3804.         CloseRegKey $($R1)
  3805.         CloseRegKey $($R2)
  3806.         CloseRegKey $($R3)
  3807.         Ifstr(i) $(RegistryErrorIndex) == SERVICE_ALREADY_EXISTS
  3808.            return $(Status)
  3809.         EndIf
  3810.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  3811.             Debug-Output "OEMNSVRA.INF: InstallRasAcdService: Registry error create service"
  3812.             return STATUS_FAILED
  3813.         endif
  3814.     endif
  3815.     Debug-Output "InstallRasArpService exit"
  3816.     return $(Status)
  3817. [RemoveRasAcdService]
  3818.     set Status = STATUS_SUCCESSFUL
  3819.     set KeyNull = ""
  3820.     Debug-Output "RemoveRasAcdService entry"
  3821.     OpenRegKey $(!REG_H_LOCAL) "" $(!RasAcdKeyName) $(!MAXIMUM_ALLOWED) KeyService
  3822.     Ifstr(i) $(KeyService) != $(KeyNull)
  3823.         Shell "utility.inf", RemoveService $(!ProductRASACDName) "YES"
  3824.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3825.             Debug-Output "OEMNSVRA.INF: RemoveRasAcdService : ShellCode error"
  3826.             return STATUS_FAILED
  3827.         endif
  3828.         set RegistryErrorIndex = $($R0)
  3829.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  3830.             Debug-Output "OEMNSVRA.INF: RemoveRasAcdService: Registry error: "
  3831.             return STATUS_FAILED
  3832.         endif
  3833.         CloseRegKey $(KeyService)
  3834.     endif
  3835.     Debug-Output "RemoveRasAcdService exit"
  3836.     return $(Status)
  3837. [InstallNdisTapiService]
  3838.     set Status = STATUS_SUCCESSFUL
  3839.     set KeyNull = ""
  3840.     Debug-Output "InstallNdisTapiService entry"
  3841.     OpenRegKey $(!REG_H_LOCAL) "" $(!NdisTapiKeyName) $(!MAXIMUM_ALLOWED) KeyService
  3842.     Ifstr(i) $(KeyService) == $(KeyNull)
  3843.         Shell "utility.inf", CreateService, $(!ProductNDISTAPIName), +
  3844.             $(!ProductNDISTAPIDisplayName), +
  3845.             $(!ProductNDISTAPIImagePath), +
  3846.             "kernelauto", "NDIS", {}, ""
  3847.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3848.             Debug-Output "OEMNSVRA.INF: InstallNdisTapiService : ShellCode error"
  3849.             return STATUS_FAILED
  3850.         endif
  3851.         set RegistryErrorIndex = $($R0)
  3852.         set ParamKey = $($R2)
  3853.         CloseRegKey $($R1)
  3854.         CloseRegKey $($R3)
  3855.         Ifstr(i) $(RegistryErrorIndex) == SERVICE_ALREADY_EXISTS
  3856.            return $(Status)
  3857.         EndIf
  3858.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  3859.             Debug-Output "OEMNSVRA.INF: InstallNdisTapiService: Registry error create service"
  3860.             return STATUS_FAILED
  3861.         endif
  3862.         ifstr(i) $(!STF_PRODUCT) != "WINNT"
  3863.             SetRegValue $(ParamKey) {AsyncEventQueueSize, 0, $(!REG_VT_DWORD), 3072}
  3864.         else
  3865.             SetRegValue $(ParamKey) {AsyncEventQueueSize, 0, $(!REG_VT_DWORD), 768}
  3866.         endif
  3867.         CloseRegKey $(ParamKey)
  3868.     endif
  3869.     Ifstr(i) $(KeyService) != $(KeyNull)
  3870.         CloseRegKey $(KeyService)
  3871.     endif
  3872.     Debug-Output "InstallNdisTapiService exit"
  3873.     return $(Status)
  3874. [RemoveNdisTapiService]
  3875.     set Status = STATUS_SUCCESSFUL
  3876.     set KeyNull = ""
  3877.     Debug-Output "RemoveNdisTapiService entry"
  3878.     OpenRegKey $(!REG_H_LOCAL) "" $(!NdisTapiKeyName) $(!MAXIMUM_ALLOWED) KeyService
  3879.     Ifstr(i) $(KeyService) != $(KeyNull)
  3880.         Shell "utility.inf", RemoveService $(!ProductNDISTAPIName) "YES"
  3881.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3882.             Debug-Output "OEMNSVRA.INF: RemoveNdisTapiService : ShellCode error"
  3883.             return STATUS_FAILED
  3884.         endif
  3885.         set RegistryErrorIndex = $($R0)
  3886.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  3887.             Debug-Output "OEMNSVRA.INF: RemoveNdisTapiService: Registry error: "
  3888.             return STATUS_FAILED
  3889.         endif
  3890.         CloseRegKey $(KeyService)
  3891.     endif
  3892.     Debug-Output "RemoveNdisTapiService exit"
  3893.     return $(Status)
  3894. [InstallNwlnkRipService]
  3895.     Debug-Output "InstallNwlnkRipService entry"
  3896.     set Status  = STATUS_FAILED
  3897.     set KeyNull = ""
  3898.     Set SrcDir  = $(!STF_SRCDIR)
  3899.     ifstr(i) $(!NTN_InstallMode) == "install"
  3900.        set !STF_SRCDIR_OVERRIDE = $(SrcDir)
  3901.     endif
  3902.     set AddCopy  = YES
  3903.     set DoCopy   = YES
  3904.     set DoConfig = YES
  3905.     set SaveNTN_InstallMode = $(!NTN_InstallMode)
  3906.     set !NTN_InstallMode = install
  3907.     Shell "oemnsvrr.inf" InstallOption $(!STF_LANGUAGE) "NWLNKRIP"  +
  3908.           $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig) "RAS"
  3909.     set !NTN_InstallMode = $(SaveNTN_InstallMode)
  3910.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3911.         Debug-Output "Error installing NWLNKRIP service"
  3912.         Goto InstallNwlnkRipServiceEnd
  3913.     Endif
  3914.     Set InstallStatus = $($R0)
  3915.     Ifstr(i) $(InstallStatus) != STATUS_SUCCESSFUL
  3916.         Ifstr(i) $(InstallStatus) != STATUS_USERCANCEL
  3917.             Debug-Output "InstallNwlnkRipService returned "$(InstallStatus)
  3918.             Goto InstallNwlnkRipServiceEnd
  3919.         Endif
  3920.     Endif
  3921.     OpenRegKey $(!REG_H_LOCAL) "" $(!RasIsnRipKeyName) $(!MAXIMUM_ALLOWED) KeyService
  3922.     ifstr $(KeyService) != ""
  3923.         OpenRegKey $(KeyService) "" "Parameters" $(!MAXIMUM_ALLOWED) KeyParams
  3924.         ifstr(i) $(KeyParams) != ""
  3925.             GetRegValue $(KeyParams),"NetbiosRouting", NetbiosRoutingInfo
  3926.             Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  3927.                set NetbiosRouting = *($(NetbiosRoutingInfo), 4)
  3928.             else
  3929.                set NetbiosRouting = 2
  3930.             endif
  3931.             ifint $(NetbiosRouting) == 0
  3932.                set NetbiosRouting = 2
  3933.             else-ifint $(NetbiosRouting) == 1
  3934.                set NetbiosRouting = 3
  3935.             endif
  3936.             SetRegValue $(KeyParams) {NetbiosRouting, $(NoTitle), $(!REG_VT_DWORD), $(NetbiosRouting)}
  3937.             CloseRegKey $(KeyParams)
  3938.         endif
  3939.         CloseRegKey $(KeyService)
  3940.     endif
  3941.     Shell "" AddServiceDependency "RemoteAccess" $(!ProductRASISNRIPName)
  3942.     ifstr(i) $($R0) == STATUS_FAILED
  3943.         Debug-Output "InstallNwlnkRipService: error adding service dependency"
  3944.     endif
  3945.     set Status = STATUS_SUCCESSFUL
  3946. InstallNwlnkRipServiceEnd =+
  3947.     Debug-Output "InstallNwlnkRipService exit"
  3948.     return $(Status)
  3949. [RemoveNwlnkRipService]
  3950.     Debug-Output "RemoveNwlnkRipService entry"
  3951.     set Status = STATUS_FAILED
  3952.     set KeyNull = ""
  3953.     Set SrcDir  = $(!STF_SRCDIR)
  3954.     set AddCopy  = YES
  3955.     set DoCopy   = YES
  3956.     set DoConfig = YES
  3957.     set SaveNTN_InstallMode = $(!NTN_InstallMode)
  3958.     set !NTN_InstallMode = deinstall
  3959.     Shell "oemnsvrr.inf" InstallOption $(!STF_LANGUAGE) "NWLNKRIP"  +
  3960.           $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig) "RAS"
  3961.     set !NTN_InstallMode = $(SaveNTN_InstallMode)
  3962.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3963.         Debug-Output "Error removing NWLNKRIP service"
  3964.         Goto RemoveNwlnkRipServiceEnd
  3965.     Endif
  3966.     Set RemoveStatus = $($R0)
  3967.     Ifstr(i) $(RemoveStatus) != STATUS_SUCCESSFUL
  3968.         Ifstr(i) $(RemoveStatus) != STATUS_USERCANCEL
  3969.             Debug-Output "RemoveNwlnkRipService returned "$(RemoveStatus)
  3970.             Goto RemoveNwlnkRipServiceEnd
  3971.         Endif
  3972.     Endif
  3973.     Shell "" RemoveServiceDependency "RemoteAccess" $(!ProductRASISNRIPName)
  3974.     ifstr(i) $($R0) == STATUS_FAILED
  3975.         Debug-Output "RemoveNwlnkRipService: error removing service dependency"
  3976.     endif
  3977.     set Status = STATUS_SUCCESSFUL
  3978. RemoveNwlnkRipServiceEnd =+
  3979.     Debug-Output "RemoveNwlnkRipService exit"
  3980.     return $(Status)
  3981. [InstallIsnSapService]
  3982.     Debug-Output "InstallIsnSapService entry"
  3983.     set Status  = STATUS_FAILED
  3984.     set KeyNull = ""
  3985.     Set SrcDir  = $(!STF_SRCDIR)
  3986.     ifstr(i) $(!NTN_InstallMode) == "install"
  3987.        set !STF_SRCDIR_OVERRIDE = $(SrcDir)
  3988.     endif
  3989.     set AddCopy  = YES
  3990.     set DoCopy   = YES
  3991.     set DoConfig = YES
  3992.     set SaveNTN_InstallMode = $(!NTN_InstallMode)
  3993.     set !NTN_InstallMode = install
  3994.     Shell "oemnsvsa.inf" InstallOption $(!STF_LANGUAGE) "SAP"  +
  3995.           $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig) "RAS"
  3996.     set !NTN_InstallMode = $(SaveNTN_InstallMode)
  3997.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3998.         Debug-Output "Error installing SAP agent"
  3999.         Goto InstallIsnSapServiceEnd
  4000.     Endif
  4001.     Set InstallStatus = $($R0)
  4002.     Ifstr(i) $(InstallStatus) != STATUS_SUCCESSFUL
  4003.         Ifstr(i) $(InstallStatus) != STATUS_USERCANCEL
  4004.             Debug-Output "InstallSapService returned "$(InstallStatus)
  4005.             Goto InstallIsnSapServiceEnd
  4006.         Endif
  4007.     Endif
  4008.     Shell "" AddServiceDependency "RemoteAccess" $(!ProductRASISNSAPName)
  4009.     ifstr(i) $($R0) == STATUS_FAILED
  4010.         Debug-Output "InstallIsnSapService: error adding service dependency"
  4011.     endif
  4012.     set Status = STATUS_SUCCESSFUL
  4013. InstallIsnSapServiceEnd =+
  4014.     Debug-Output "InstallIsnSapService exit"
  4015.     return $(Status)
  4016. [RemoveIsnSapService]
  4017.     Debug-Output "RemoveIsnSapService entry"
  4018.     set Status = STATUS_FAILED
  4019.     set KeyNull = ""
  4020.     Set SrcDir  = $(!STF_SRCDIR)
  4021.     set AddCopy  = YES
  4022.     set DoCopy   = YES
  4023.     set DoConfig = YES
  4024.     set SaveNTN_InstallMode = $(!NTN_InstallMode)
  4025.     set !NTN_InstallMode = deinstall
  4026.     Shell "oemnsvsa.inf" InstallOption $(!STF_LANGUAGE) "SAP"  +
  4027.           $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig) "RAS"
  4028.     set !NTN_InstallMode = $(SaveNTN_InstallMode)
  4029.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4030.         Debug-Output "Error removing SAP agent"
  4031.         Goto RemoveIsnSapServiceEnd
  4032.     Endif
  4033.     Set RemoveStatus = $($R0)
  4034.     Ifstr(i) $(RemoveStatus) != STATUS_SUCCESSFUL
  4035.         Ifstr(i) $(RemoveStatus) != STATUS_USERCANCEL
  4036.             Debug-Output "RemoveIsnSapService returned "$(RemoveStatus)
  4037.             Goto RemoveIsnSapServiceEnd
  4038.         Endif
  4039.     Endif
  4040.     Shell "" RemoveServiceDependency "RemoteAccess" $(!ProductRASISNSAPName)
  4041.     ifstr(i) $($R0) == STATUS_FAILED
  4042.         Debug-Output "RemoveIsnSapService: error removing service dependency"
  4043.     endif
  4044.     set Status = STATUS_SUCCESSFUL
  4045. RemoveIsnSapServiceEnd =+
  4046.     Debug-Output "RemoveIsnSapService exit"
  4047.     return $(Status)
  4048. [WritePPPParameters]
  4049.     Debug-Output "WritePPPParameters: entry"
  4050.     Set Status = STATUS_FAILED
  4051.     set KeyNull = ""
  4052.     set RasManKeyName =  $(!NTN_ServiceBase)"\RasMan"
  4053.     set RasManPPPKeyName =  $(!NTN_ServiceBase)"\RasMan\PPP"
  4054.     set RasProtocolsKeyName = $(!NTN_SoftwareBase)"\Microsoft\RAS\PROTOCOLS"
  4055.     OpenRegKey $(!REG_H_LOCAL) "" $(RasManKeyName) $(!MAXIMUM_ALLOWED) KeyRasMan
  4056.     ifstr $(KeyRasMan) != $(KeyNull)
  4057.        OpenRegKey $(KeyRasMan) "" "PPP" $(!MAXIMUM_ALLOWED) KeyRasManPPP
  4058.        set NewValueList = {}
  4059.        ifstr $(KeyRasManPPP) != $(KeyNull)
  4060.            EnumRegValue $(KeyRasManPPP) NewValueList
  4061.        else
  4062.            CreateRegKey $(KeyRasMan) +
  4063.                    {"PPP",0,GenericClass} "" $(!MAXIMUM_ALLOWED) "" KeyRasManPPP
  4064.            CloseRegKey $(KeyRasMan)
  4065.            ifstr $(KeyRasManPPP) == $(KeyNull)
  4066.                Debug-Output "WritePPPParameters: error creating RasMan\ppp key"
  4067.                goto WritePPPParametersEnd
  4068.            endif
  4069.        endif
  4070.     else
  4071.        Debug-Output "WritePPPParameters: error opening RasMan key"
  4072.        goto UpdateCPListEnd
  4073.     endif
  4074.     ifstr(i) $(NewValueList) == {}
  4075.         set NewValueList = {{MaxConfigure, 0, $(!REG_VT_DWORD), 10}, +
  4076.                             {MaxTerminate, 0, $(!REG_VT_DWORD), 2}, +
  4077.                             {MaxFailure,   0, $(!REG_VT_DWORD), 10}. +
  4078.                             {MaxReject,    0, $(!REG_VT_DWORD), 5}. +
  4079.                             {NegotiateTime, 0, $(!REG_VT_DWORD), 150}, +
  4080.                             {Logging, 0, $(!REG_VT_DWORD), 0}, +
  4081.                             {RestartTimer, 0, $(!REG_VT_DWORD), 3}}
  4082.     endif
  4083.     forlistdo $(NewValueList)
  4084.         SetRegValue $(KeyRasManPPP) $($)
  4085.     endforlistdo
  4086.     set ForceEncryptedPassword = 2
  4087.     set ForceEncryptedData     = 0
  4088.     OpenRegKey $(!REG_H_LOCAL) "" $(RasProtocolsKeyName) $(!MAXIMUM_ALLOWED) KeyRasProtocols
  4089.     ifstr $(KeyRasProtocols) != $(KeyNull)
  4090.         GetRegValue $(KeyRasProtocols) "ForceEncryptedPassword" ForceValue
  4091.         ifint $(RegLastError) == 0
  4092.             set ForceEncryptedPassword = *($(ForceValue), 4)
  4093.         endif
  4094.         GetRegValue $(KeyRasProtocols) "ForceEncryptedData" ForceValue
  4095.         ifint $(RegLastError) == 0
  4096.             set ForceEncryptedData = *($(ForceValue), 4)
  4097.         endif
  4098.         SetRegValue $(KeyRasManPPP) {ForceEncryptedPassword, 0, +
  4099.                                      $(!REG_VT_DWORD),$(ForceEncryptedPassword)}
  4100.         SetRegValue $(KeyRasManPPP) {ForceEncryptedData, 0, +
  4101.                                      $(!REG_VT_DWORD),$(ForceEncryptedData)}
  4102.         CloseRegKey $(KeyRasProtocols)
  4103.     endif
  4104.     CloseRegKey $(KeyRasManPPP)
  4105.     set Status = STATUS_SUCCESSFUL
  4106. WritePPPParametersEnd =+
  4107.     Debug-Output "WritePPPParameters: exit"
  4108.     return $(Status)
  4109. [UpdateCPList]
  4110.     Debug-Output "UpdateCPList: entry"
  4111.     Set Status = STATUS_FAILED
  4112.     set KeyNull = ""
  4113.     set RasManPPPKeyName =  $(!NTN_ServiceBase)"\RasMan\PPP"
  4114.     Shell "" WritePPPParameters
  4115.     Shell "" QuerySelectedProtocols
  4116.     ifstr(i) $($R0) == STATUS_SUCCESSFUL
  4117.         set fNetbeuiSelected   = $($R1)
  4118.         set fTcpIpSelected     = $($R2)
  4119.         set fIpxSelected       = $($R3)
  4120.         set fNetbeuiAllowed    = $($R4)
  4121.         set fTcpIpAllowed      = $($R5)
  4122.         set fIpxAllowed        = $($R6)
  4123.     else
  4124.         Debug-Output "UpdateCPList: error QuerySelectedProtocols"
  4125.         goto UpdateCPListEnd
  4126.     endif
  4127.     OpenRegKey $(!REG_H_LOCAL) "" $(RasManPPPKeyName) $(!MAXIMUM_ALLOWED) KeyRasManPPP
  4128.     ifstr $(KeyRasManPPP) != $(KeyNull)
  4129.         EnumRegKey $(KeyRasManPPP) OldCPList
  4130.         ifstr(i) $(fNetbeuiSelected) == TRUE
  4131.             set fNetbeuiChosen = TRUE
  4132.         else
  4133.             set fNetbeuiChosen = $(fNetbeuiAllowed)
  4134.         endif
  4135.         ifstr(i) $(fTcpIpSelected) == TRUE
  4136.             set fTcpIpChosen = TRUE
  4137.         else
  4138.             set fTcpIpChosen = $(fTcpIpAllowed)
  4139.         endif
  4140.         ifstr(i) $(fIpxSelected) == TRUE
  4141.             set fIpxChosen = TRUE
  4142.         else
  4143.             set fIpxChosen = $(fIpxAllowed)
  4144.         endif
  4145.         set CPList = {"PAP", "CHAP", "SPAP", "CBCP", "COMPCP"}
  4146.         ifstr(i) $(fNetbeuiChosen) == TRUE
  4147.             set CPList = >($(CPList), "NBFCP")
  4148.         endif
  4149.         ifstr(i) $(fTcpIpChosen) == TRUE
  4150.             set CPList = >($(CPList), "IPCP")
  4151.         endif
  4152.         ifstr(i) $(fIpxChosen) == TRUE
  4153.             set CPList = >($(CPList), "IPXCP")
  4154.         endif
  4155.         set CurrentCPList = {}
  4156.         ForListDo $(OldCPList)
  4157.            set CPName = *($($),1)
  4158.            ifcontains(i) $(CPName) not-in $(CPList)
  4159.                DeleteRegTree $(KeyRasManPPP) $(CPName)
  4160.            else
  4161.                set CurrentCPList = >($(CurrentCPList), $(CPName))
  4162.            endif
  4163.         EndForListDo
  4164.         forlistdo $(CPList)
  4165.             ifcontains(i) $($) not-in $(CurrentCPList)
  4166.                 CreateRegKey $(KeyRasManPPP) +
  4167.                          {$($),0,GenericClass} "" $(!MAXIMUM_ALLOWED) "" KeyCp
  4168.                 set path = #(CP-List, $($), 1)
  4169.                 set NewValueList = {{Path, 0, $(!REG_VT_EXPAND_SZ), $(path)}}
  4170.                 ifstr $(KeyCp) != $(KeyNull)
  4171.                     Shell  "utility.inf", AddValueList, $(KeyCp), +
  4172.                                                               $(NewValueList)
  4173.                     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4174.                         Debug-Output "UpdateCPList:AddValueList bombed out"
  4175.                         goto UpdateCPListEnd
  4176.                     endif
  4177.                     set RegistryErrorIndex = $($R0)
  4178.                     Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  4179.                         goto UpdateCPListEnd
  4180.                     endif
  4181.                     CloseRegKey $(KeyCp)
  4182.                 else
  4183.                     Debug-Output "UpdateCPList:error creating key"
  4184.                 endif
  4185.             endif
  4186.         endforlistdo
  4187.         CloseRegKey $(KeyRasManPPP)
  4188.     else
  4189.         Debug-Output "UpdateCPList:error opening RASMAN\PPP key"
  4190.         goto UpdateCPListEnd
  4191.     endif
  4192.     set Status = STATUS_SUCCESSFUL
  4193. UpdateCPListEnd =+
  4194.     Debug-Output "UpdateCPList: exit"
  4195.     return $(Status)
  4196. [UpdateSoftwareType]
  4197.     Debug-Output "UpdateSoftwareType: entry"
  4198.     set ProductKeyName = $(!NTN_SoftwareBase)"\Microsoft\RAS\CurrentVersion"
  4199.     set Status = STATUS_FAILED
  4200.     set KeyCurrentVersion = ""
  4201.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(!MAXIMUM_ALLOWED) KeyCurrentVersion
  4202.     ifstr $(KeyCurrentVersion) == ""
  4203.        Debug-Output "OEMNSVRA.INF:UpdateSoftwareType: couldn't open "$(ProductKeyName)
  4204.        goto UpdateSoftwareTypeEnd
  4205.     endif
  4206.     SetRegValue $(KeyCurrentVersion) {SoftwareType, 0, $(!REG_VT_SZ), "service" }
  4207.     CloseRegKey $(KeyCurrentVersion)
  4208.     set Status = STATUS_SUCCESSFUL
  4209. UpdateSoftwareTypeEnd=+
  4210.     Debug-Output "UpdateSoftwareType: exit"
  4211.     return $(Status)
  4212. [UpdateLLInterface]
  4213.     Debug-Output "UpdateLLInterface: entry"
  4214.     set Status = STATUS_FAILED
  4215.     set KeyNull = ""
  4216.     set LLInterface = "\Device\RASARP"
  4217.     set IPLinkageKeyName = $(!NTN_ServiceBase)"\TCPIP\Linkage"
  4218.     OpenRegKey $(!REG_H_LOCAL) "" $(IPLinkageKeyName) $(!MAXIMUM_ALLOWED) KeyIpLinkage
  4219.     ifstr $(KeyIpLinkage) == $(KeyNull)
  4220.        Debug-Output "OEMNSVRA.INF:UpdateLLInterface: couldn't open IP Linkage key"
  4221.        goto UpdateLLInterfaceEnd
  4222.     endif
  4223.     set NdisWanList = {}
  4224.     GetRegValue    $(KeyIpLinkage) "Bind" TmpList
  4225.     ForListDo *($(TmpList),4)
  4226.         Split-String $($), "\", BindList
  4227.         QueryListSize ListSize $(BindList)
  4228.         set ServiceName = *($(BindList), $(ListSize))
  4229.         LibraryProcedure Result $(!LIBHANDLE) SetupStrncmp $(ServiceName) "NdisWan" 7
  4230.         ifint $(Result) == 0
  4231.             set NdisWanList = >($(NdisWanList), $(ServiceName))
  4232.         endif
  4233.     EndForListDo
  4234.     CloseRegKey $(KeyIpLinkage)
  4235.     QueryListSize ListSize $(NdisWanList)
  4236.     ifint $(ListSize) >= 1
  4237.     ForListDo $(NdisWanList)
  4238.         set ServiceKeyName = $(!NTN_ServiceBase)"\"$($)"\Parameters\TCPIP"
  4239.         OpenRegKey $(!REG_H_LOCAL) "" $(ServiceKeyName) $(!MAXIMUM_ALLOWED) KeyNdisWan
  4240.         ifstr $(KeyNdisWan) != $(KeyNull)
  4241.             SetRegValue $(KeyNdisWan) {IPAddress, 0, +
  4242.                               $(!REG_VT_MULTI_SZ), {"0.0.0.0"}}
  4243.             SetRegValue $(KeyNdisWan) {SubnetMask, 0, +
  4244.                               $(!REG_VT_MULTI_SZ), {"0.0.0.0"}}
  4245.             SetRegValue $(KeyNdisWan) {DefaultGateway, 0, +
  4246.                               $(!REG_VT_MULTI_SZ), {""}}
  4247.             SetRegValue $(KeyNdisWan) {LLInterface, 0,+
  4248.                                          $(!REG_VT_SZ), $(LLInterface)}
  4249.             SetRegValue $(KeyNdisWan) {EnableDHCP, 0, +
  4250.                                           $(!REG_VT_DWORD), 0}
  4251.         else
  4252.             CreateRegKey $(!REG_H_LOCAL) +
  4253.                          {$(ServiceKeyName),0,GenericClass} "" +
  4254.                           $(!MAXIMUM_ALLOWED) "" KeyNdisWan
  4255.             ifstr $(KeyNdisWan) != $(KeyNull)
  4256.                 SetRegValue $(KeyNdisWan) {IPAddress, 0, +
  4257.                                       $(!REG_VT_MULTI_SZ), {"0.0.0.0"}}
  4258.                 SetRegValue $(KeyNdisWan) {SubnetMask, 0, +
  4259.                               $(!REG_VT_MULTI_SZ), {"0.0.0.0"}}
  4260.                 SetRegValue $(KeyNdisWan) {DefaultGateway, 0, +
  4261.                               $(!REG_VT_MULTI_SZ), {""}}
  4262.                 SetRegValue $(KeyNdisWan) {LLInterface, 0,+
  4263.                                           $(!REG_VT_SZ), $(LLInterface)}
  4264.                 SetRegValue $(KeyNdisWan) {EnableDHCP, 0, +
  4265.                                           $(!REG_VT_DWORD), 0}
  4266.                 SetRegValue $(KeyNdisWan) {UseZeroBroadcast, 0, +
  4267.                                           $(!REG_VT_DWORD), 0}
  4268.            else
  4269.                Debug-Output "OEMNSVRA.INF:UpdateLLInterface: couldn't create NdisWan params-tcpip key"
  4270.                goto UpdateLLInterfaceEnd
  4271.            endif
  4272.         endif
  4273.         CloseRegKey $(KeyNdisWan)
  4274.         EndForListDo
  4275.     endif
  4276.     set Status = STATUS_SUCCESSFUL
  4277. UpdateLLInterfaceEnd =+
  4278.     Debug-Output "UpdateLLInterface: exit"
  4279.     return $(Status)
  4280. [SetRasArpBindValueFromTcpIP]
  4281.     Debug-Output "SetRasArpBindValueFromTcpIP: entry"
  4282.     set Status = STATUS_FAILED
  4283.     set KeyNull = ""
  4284.     set IPLinkageKeyName = $(!NTN_ServiceBase)"\TCPIP\Linkage"
  4285.     OpenRegKey $(!REG_H_LOCAL) "" $(IPLinkageKeyName) $(!MAXIMUM_ALLOWED) KeyIpLinkage
  4286.     ifstr $(KeyIpLinkage) == $(KeyNull)
  4287.        Debug-Output "OEMNSVRA.INF:SetRasArpBindValueFromTcpIP: couldn't open IP Linkage key"
  4288.        goto SetRasArpBindValueFromTcpIPEnd
  4289.     endif
  4290.     set NdisWanList = {}
  4291.     GetRegValue $(KeyIpLinkage) "Bind" TmpList
  4292.     ForListDo *($(TmpList),4)
  4293.         Split-String $($), "\", BindList
  4294.         QueryListSize ListSize $(BindList)
  4295.         set ServiceName = *($(BindList), $(ListSize))
  4296.         LibraryProcedure Result $(!LIBHANDLE) SetupStrncmp $(ServiceName) "NdisWan" 7
  4297.         ifint $(Result) == 0
  4298.             set NdisWanList = >($(NdisWanList), $($))
  4299.         endif
  4300.     EndForListDo
  4301.     set RasArpLinkageKeyName = $(!NTN_ServiceBase)"\RASARP\Linkage"
  4302.     OpenRegKey $(!REG_H_LOCAL) "" $(RasArpLinkageKeyName) $(!MAXIMUM_ALLOWED) KeyRasArpLinkage
  4303.     ifstr $(KeyRasArpLinkage) != $(KeyNull)
  4304.         SetRegValue $(KeyRasArpLinkage) {Bind, 0, $(!REG_VT_MULTI_SZ), $(NdisWanList)}
  4305.         CloseRegKey $(KeyRasArpLinkage)
  4306.     endif
  4307.     CloseRegKey $(KeyIpLinkage)
  4308.     set Status = STATUS_SUCCESSFUL
  4309. SetRasArpBindValueFromTcpIPEnd=+
  4310.     Debug-Output "SetRasArpBindValueFromTcpIP: entry"
  4311.     return $(Status)
  4312. [UpdateNetGroupDependency]
  4313.     Set  Status = STATUS_SUCCESSFUL
  4314.     set  KeyNull = ""
  4315.     set  fNetbeuiInstalled  = $($0)
  4316.     set  fTcpIpInstalled    = $($1)
  4317.     set  fIpxInstalled      = $($2)
  4318.     Debug-Output "UpdateNetGroupDependency entry"
  4319.     set ServiceList =  {}
  4320.     ifstr(i) $(fNetbeuiInstalled) == TRUE
  4321.         set ServiceList = >($(ServiceList), "nbf")
  4322.     endif
  4323.     ifstr(i) $(fTcpIpInstalled) == TRUE
  4324.         set ServiceList = >($(ServiceList), "tcpip")
  4325.     endif
  4326.     ifstr(i) $(fIpxInstalled) == TRUE
  4327.         set ServiceList = >($(ServiceList), "nwlnkipx")
  4328.     endif
  4329.     ForListDo $(ServiceList)
  4330.         set Service = $($)
  4331.         Debug-Output "OEMNSVRA.INF: Changing group dependency of "$(Service)
  4332.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(Service) +
  4333.                    $(!MAXIMUM_ALLOWED) KeyService
  4334.         ifstr $(KeyService) != $(KeyNull)
  4335.             set newGroupList = {"+NDIS", "+NDISWAN"}
  4336.             GetRegValue    $(KeyService) "DependOnGroup" GrpList
  4337.             ifint $(RegLastError) == 0
  4338.                 Debug-Output "UpdateNetGroupDependency: old group List "*($(GrpList), 4)
  4339.                 ForListDo *($(GrpList),4)
  4340.                     ifstr(i) $($) != "NDIS"
  4341.                         ifstr(i) $($) != "NDISWAN"
  4342.                             set newGroup = "+"$($)
  4343.                             set newGroupList = >($(newGroupList), $(newGroup))
  4344.                         endif
  4345.                     endif
  4346.                 EndForListDo
  4347.             endif
  4348.             GetRegValue $(KeyService) "DependOnService" ServiceList
  4349.             ifint $(RegLastError) == 0
  4350.                 Debug-Output "UpdateNetGroupDependency: old service List "*($(ServiceList), 4)
  4351.                 ForListDo *($(ServiceList),4)
  4352.                     set newGroupList = >($(newGroupList), $($))
  4353.                 EndForListDo
  4354.             endif
  4355.             Debug-Output "OEMNSVRA.INF: UpdateNetGroupDependency: new depend List "$(newGroupList)
  4356.             LibraryProcedure Result, $(!LIBHANDLE), SetupChangeServiceConfig, $(Service) $(!SERVICE_NO_CHANGE), $(!SERVICE_NO_CHANGE), $(!SERVICE_NO_CHANGE), "", "", $(newGroupList), "", "", ""
  4357.             CloseRegKey $(KeyService)
  4358.         else
  4359.             Debug-Output "UpdateNetGroupDependency: failed to open service linkage key"$(Service)
  4360.         endif
  4361.     EndForListDo
  4362.     Debug-Output "UpdateNetGroupDependency exit"
  4363.     return $(Status)
  4364. [RemoveNetGroupDependency]
  4365.     Set  Status = STATUS_SUCCESSFUL
  4366.     set  KeyNull = ""
  4367.     set  fNetbeuiInstalled  = $($0)
  4368.     set  fTcpIpInstalled    = $($1)
  4369.     set  fIpxInstalled      = $($2)
  4370.     Debug-Output "UpdateNetGroupDependency entry"
  4371.     set ServiceList =  {"nbf", "tcpip", "nwlnkipx"}
  4372.     ForListDo $(ServiceList)
  4373.         set Service = $($)
  4374.         Debug-Output "OEMNSVRA.INF: Changing group dependency of "$(Service)
  4375.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(Service) +
  4376.                    $(!MAXIMUM_ALLOWED) KeyService
  4377.         ifstr $(KeyService) != $(KeyNull)
  4378.           set DeleteFlag = ""
  4379.           GetRegValue $(KeyService),"DeleteFlag", DeleteFlagInfo
  4380.           set DeleteFlag = *($(DeleteFlagInfo), 4)
  4381.           ifint $(DeleteFlag) != 1
  4382.             set newGroupList = {}
  4383.             GetRegValue    $(KeyService) "DependOnGroup" GrpList
  4384.             ifint $(RegLastError) == 0
  4385.                 Debug-Output "UpdateNetGroupDependency: old List "*($(GrpList), 4)
  4386.                 ForListDo *($(GrpList),4)
  4387.                     ifstr(i) $($) != "NDISWAN"
  4388.                         set newGroup = "+"$($)
  4389.                         set newGroupList = >($(newGroupList), $(newGroup))
  4390.                     endif
  4391.                 EndForListDo
  4392.             endif
  4393.             GetRegValue $(KeyService) "DependOnService" ServiceList
  4394.             ifint $(RegLastError) == 0
  4395.                 Debug-Output "UpdateNetGroupDependency: old service List "*($(ServiceList), 4)
  4396.                 ForListDo *($(ServiceList),4)
  4397.                     set newGroupList = >($(newGroupList), $($))
  4398.                 EndForListDo
  4399.             endif
  4400.             Debug-Output "OEMNSVRA.INF: UpdateNetGroupDependency: new depend List "$(newGroupList)
  4401.             LibraryProcedure Result, $(!LIBHANDLE), SetupChangeServiceConfig, $(Service) $(!SERVICE_NO_CHANGE), $(!SERVICE_NO_CHANGE), $(!SERVICE_NO_CHANGE), "", "", $(newGroupList), "", "", ""
  4402.             CloseRegKey $(KeyService)
  4403.           endif
  4404.         else
  4405.             Debug-Output "UpdateNetGroupDependency: failed to open service linkage key"$(Service)
  4406.         endif
  4407.     EndForListDo
  4408.     Debug-Output "UpdateNetGroupDependency exit"
  4409.     return $(Status)
  4410. [UpdateIPRouterInfo]
  4411.     set EnableRouter = $($0)
  4412.     set KeyNull      = ""
  4413.     Debug-Output "UpdateIPRouterInfo entry"
  4414.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\TCPIP\parameters" $(!MAXIMUM_ALLOWED) KeyIpParams
  4415.     ifstr $(KeyIpParams) != $(KeyNull)
  4416.         SetRegValue $(KeyIpParams) {IPEnableRouter, 0,+
  4417.                                     $(!REG_VT_DWORD), $(EnableRouter)}
  4418.         CloseRegKey $(KeyIpParams)
  4419.     endif
  4420.     Debug-Output "UpdateIPRouterInfo exit"
  4421.     return STATUS_SUCCESSFUL
  4422. [UpdateIPXRouterInfo]
  4423.     set Status = STATUS_FAILED
  4424.     set EnableRouter = $($0)
  4425.     set KeyNull      = ""
  4426.     Debug-Output "UpdateIPXRouterInfo entry"
  4427.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\NWLNKIPX\NetConfig" $(!MAXIMUM_ALLOWED) KeyIpxNetConfig
  4428.     ifstr $(KeyIpxNetConfig) != $(KeyNull)
  4429.         EnumRegKey $(KeyIpxNetConfig) DriverList
  4430.         ForListDo $(DriverList)
  4431.            set DriverName = *($($),1)
  4432.            OpenRegKey $(KeyIpxNetConfig) "" $(DriverName) $(!MAXIMUM_ALLOWED) Driver
  4433.            ifstr $(Driver) == $(KeyNull)
  4434.                Debug-Output "UpdateIPXRouterInfo: could not open key ipx\netconfig\"$(DriverName)
  4435.                CloseRegKey $(KeyIpxNetConfig)
  4436.                return $(Status)
  4437.            endif
  4438.            SetRegValue $(Driver) {EnableWanRouter, 0,+
  4439.                                     $(!REG_VT_DWORD), $(EnableRouter)}
  4440.            CloseRegKey $(Driver)
  4441.         EndForListDo
  4442.         CloseRegKey $(KeyIpxNetConfig)
  4443.         set Status = STATUS_SUCCESSFUL
  4444.     else
  4445.         Debug-Output "UpdateIPXRouterInfo: error opening ipx\netconfig key"
  4446.     endif
  4447.     Debug-Output "UpdateIPXRouterInfo exit"
  4448.     return $(Status)
  4449. [IsNetcardInstalled]
  4450.     Set Status                = STATUS_FAILED
  4451.     Set fNetcardInstalled     = FALSE
  4452.     Set KeyNull               = ""
  4453.     set ProductRASASYMACName     = "AsyncMac"
  4454.     set NetworkCardKey = $(KeyNull)
  4455.     OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) $(!MAXIMUM_ALLOWED) NetworkCardKey
  4456.     Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  4457.         set NetcardsList = {}
  4458.         EnumRegKey $(NetworkCardKey) NetcardsList
  4459.         Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  4460.            Debug-Output "IsNetcardInstalled: EnumRegKey failed."
  4461.            goto IsNetcardInstalledEnd
  4462.         endif
  4463.         ForListDo $(NetcardsList)
  4464.            set KeyName = *($($),1)
  4465.            set Card = $(KeyNull)
  4466.            OpenRegKey $(NetworkCardKey) "" $(KeyName) $(!MAXIMUM_ALLOWED) Card
  4467.            ifstr $(Card) == $(KeyNull)
  4468.                Debug-Output "IsNetcardInstalled: could not open netcard key "$(KeyName)
  4469.            else
  4470.                GetRegValue $(Card), "ProductName" ProductNameInfo
  4471.                Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  4472.                   Debug-Output "IsNetcardInstalled: ProductName not found."
  4473.                else
  4474.                   set CardProductName = *($(ProductNameInfo), 4)
  4475.                   Debug-Output "IsNetcardInstalled: ProductName. "$(CardProductName)
  4476.                   ifstr(i) $(CardProductName) != $(!ProductNDISWANName)
  4477.                    ifstr(i) $(CardProductName) != $(!ProductNDISWANDIALINName)
  4478.                     ifstr(i) $(CardProductName) != $(!ProductNDISWANDIALOUTName)
  4479.                      ifstr(i) $(CardProductName) != $(!ProductNDISWANDIALINIPName)
  4480.                       ifstr(i) $(CardProductName) != $(!ProductNDISWANDIALOUTIPName)
  4481.                        ifstr(i) $(CardProductName) != $(!ProductNDISWANDIALINOUTIPXName)
  4482.                         ifstr(i) $(CardProductName) != $(ProductRASASYMACName)
  4483.                          ifstr(i) $(CardProductName) != $(!ProductPCIMACName)
  4484.                            GetRegValue $(Card), "Manufacturer" Manufacturer
  4485.                            Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  4486.                              ifstr(i) *($(Manufacturer), 4) != "Digiboard"
  4487.                                Debug-Output "found installed netcard"
  4488.                                set fNetcardInstalled = TRUE
  4489.                                set Status = STATUS_SUCCESSFUL
  4490.                                CloseRegKey $(Card)
  4491.                                goto IsNetcardInstalledEnd
  4492.                              endif
  4493.                            endif
  4494.                          endif
  4495.                         endif
  4496.                        endif
  4497.                       endif
  4498.                      endif
  4499.                     endif
  4500.                    endif
  4501.                   endif
  4502.                endif
  4503.                CloseRegKey $(Card)
  4504.            endif
  4505.         EndForListDo
  4506.     else
  4507.         Debug-Output "IsNetcardInstalled: failed to open "$(!NetworkCardKeyName)
  4508.     endif
  4509. IsNetcardInstalledEnd =+
  4510.     ifstr(i) $(NetworkCardKey) != $(KeyNull)
  4511.         CloseRegKey $(NetworkCardKey)
  4512.     endif
  4513.     Return $(Status) $(fNetcardInstalled)
  4514. [IsNetworkConfigured]
  4515.     set WkstaKeyName   = $(!NTN_ServiceBase)"\LanmanWorkstation"
  4516.     set SrvrKeyName    = $(!NTN_ServiceBase)"\LanmanServer"
  4517.     Set KeyNull        =    ""
  4518.     Set status = STATUS_FAILED
  4519.     Set WkstaConfigured  = FALSE
  4520.     Set SrvrConfigured   = FALSE
  4521.     Debug-Output "IsNetworkConfigured WkstaKeyName "$(WkstaKeyName)
  4522.     set KeyProduct = $(KeyNull)
  4523.     OpenRegKey $(!REG_H_LOCAL) "" $(WkstaKeyName) $(!MAXIMUM_ALLOWED) KeyProduct
  4524.     Ifstr(i) $(KeyProduct) != $(KeyNull)
  4525.         GetRegValue $(KeyProduct),"DeleteFlag", DeleteFlagInfo
  4526.         set DeleteFlag = *($(DeleteFlagInfo), 4)
  4527.         ifint $(DeleteFlag) != 1
  4528.             set WkstaConfigured = TRUE
  4529.         endif
  4530.         CloseRegKey $(KeyProduct)
  4531.     endif
  4532.     Debug-Output "IsNetworkConfigured SrvrKeyName "$(SrvrKeyName)
  4533.     set KeyProduct = $(KeyNull)
  4534.     OpenRegKey $(!REG_H_LOCAL) "" $(SrvrKeyName) $(!MAXIMUM_ALLOWED) KeyProduct
  4535.     Ifstr(i) $(KeyProduct) != $(KeyNull)
  4536.         GetRegValue $(KeyProduct),"DeleteFlag", DeleteFlagInfo
  4537.         set DeleteFlag = *($(DeleteFlagInfo), 4)
  4538.         ifint $(DeleteFlag) != 1
  4539.             set SrvrConfigured = TRUE
  4540.         endif
  4541.         CloseRegKey $(KeyProduct)
  4542.     endif
  4543.     set status = STATUS_SUCCESSFUL
  4544.     Debug-Output "IsNetworkConfigured exit"
  4545.     Return $(status) $(WkstaConfigured) $(SrvrConfigured)
  4546. [QueryInstalledProtocols]
  4547.     Debug-Output "QueryInstalledProtocols entry "
  4548.     set NbfKeyName        = $(!NTN_ServiceBase)"\Nbf"
  4549.     set TcpIpKeyName      = $(!NTN_ServiceBase)"\TcpIp"
  4550.     set IpxKeyName        = $(!NTN_ServiceBase)"\NWLNKIPX"
  4551.     set AppleTalkKeyName  = $(!NTN_ServiceBase)"\AppleTalk"
  4552.     Set KeyNull        =    ""
  4553.     Set status = STATUS_FAILED
  4554.     Set NbfInstalled     = FALSE
  4555.     Set TcpIpInstalled   = FALSE
  4556.     Set IpxInstalled     = FALSE
  4557.     Set AppleTalkInstalled = FALSE
  4558.     set KeyService = $(KeyNull)
  4559.     set DeleteFlag = 0
  4560.     set DeleteFlagInfo = {}
  4561.     OpenRegKey $(!REG_H_LOCAL) "" $(NbfKeyName) $(!MAXIMUM_ALLOWED) KeyService
  4562.     Ifstr(i) $(KeyService) != $(KeyNull)
  4563.         GetRegValue $(KeyService),"DeleteFlag", DeleteFlagInfo
  4564.         set DeleteFlag = *($(DeleteFlagInfo), 4)
  4565.         ifint $(DeleteFlag) != 1
  4566.             set NbfInstalled = TRUE
  4567.         endif
  4568.         CloseRegKey $(KeyService)
  4569.     endif
  4570.     set KeyService = $(KeyNull)
  4571.     set DeleteFlag = 0
  4572.     set DeleteFlagInfo = {}
  4573.     OpenRegKey $(!REG_H_LOCAL) "" $(TcpIpKeyName) $(!MAXIMUM_ALLOWED) KeyService
  4574.     Ifstr(i) $(KeyService) != $(KeyNull)
  4575.         GetRegValue $(KeyService),"DeleteFlag", DeleteFlagInfo
  4576.         set DeleteFlag = *($(DeleteFlagInfo), 4)
  4577.         ifint $(DeleteFlag) != 1
  4578.             set TcpIpInstalled = TRUE
  4579.         endif
  4580.         CloseRegKey $(KeyService)
  4581.     endif
  4582.     set KeyService = $(KeyNull)
  4583.     set DeleteFlag = 0
  4584.     set DeleteFlagInfo = {}
  4585.     OpenRegKey $(!REG_H_LOCAL) "" $(IpxKeyName) $(!MAXIMUM_ALLOWED) KeyService
  4586.     Ifstr(i) $(KeyService) != $(KeyNull)
  4587.         GetRegValue $(KeyService),"DeleteFlag", DeleteFlagInfo
  4588.         set DeleteFlag = *($(DeleteFlagInfo), 4)
  4589.         ifint $(DeleteFlag) != 1
  4590.             set IpxInstalled = TRUE
  4591.         endif
  4592.         CloseRegKey $(KeyService)
  4593.     endif
  4594.     set KeyService = $(KeyNull)
  4595.     set DeleteFlag = 0
  4596.     set DeleteFlagInfo = {}
  4597.     OpenRegKey $(!REG_H_LOCAL) "" $(AppleTalkKeyName) $(!MAXIMUM_ALLOWED) KeyService
  4598.     Ifstr(i) $(KeyService) != $(KeyNull)
  4599.         GetRegValue $(KeyService),"DeleteFlag", DeleteFlagInfo
  4600.         set DeleteFlag = *($(DeleteFlagInfo), 4)
  4601.         ifint $(DeleteFlag) != 1
  4602.             set AppleTalkInstalled = TRUE
  4603.         endif
  4604.         CloseRegKey $(KeyService)
  4605.     endif
  4606.     set status = STATUS_SUCCESSFUL
  4607.     Debug-Output "QueryInstalledProtocols exit"
  4608.     Return $(status) $(NbfInstalled) $(TcpIpInstalled) $(IpxInstalled) +
  4609.                      $(AppleTalkInstalled)
  4610. [ProtocolInfo]
  4611.     NETBEUI               = "OEMNXPNB.INF", "NBF", 1
  4612.     TCPIP                 = "OEMNXPTC.INF", "TC", 2
  4613.     IPX                   = "OEMNXPIP.INF", "NWLNKIPX", 3
  4614. [InstallProtocol]
  4615.     Set Status                = STATUS_FAILED
  4616.     Set KeyNull               = ""
  4617.     set Protocol              = $($0)
  4618.     Debug-Output "OEMNSVRA.INF: Label: InstallProtocol"
  4619.     Set ThisInfName = #(ProtocolInfo, $(Protocol), 1)
  4620.     Set InfOption = #(ProtocolInfo, $(Protocol), 2)
  4621.     Set BbIndex = #(ProtocolInfo, $(Protocol), 3)
  4622.     Debug-Output "OEMNSVRA.INF: Installing "$(ThisInfName)
  4623.     Ifint $(BbIndex) != 0
  4624.         read-syms Billboard$(BbIndex)$(!STF_LANGUAGE)
  4625.         Shell "subroutn.inf" PushBillboard NETSTATUSDLG $(Status)
  4626.         Set BillboardVisible = 1
  4627.     Else-ifint $(BillboardVisible) != 0
  4628.         Shell "subroutn.inf" PopBillboard
  4629.         Set BillboardVisible = 0
  4630.     Endif
  4631.     set AddCopy  = YES
  4632.     set DoCopy   = YES
  4633.     set DoConfig = YES
  4634.     set InvokedByRas = YES
  4635.     set SaveNTN_InstallMode = $(!NTN_InstallMode)
  4636.     set SaveSTF_INSTALL_MODE = $(!STF_INSTALL_MODE)
  4637.     set !NTN_InstallMode = install
  4638.     set !STF_INSTALL_MODE = EXPRESS
  4639.     Shell $(ThisInfName) InstallOption $(!STF_LANGUAGE) $(InfOption) $(!STF_SRCDIR) $(AddCopy) $(DoCopy) $(DoConfig) $(InvokedByRas)
  4640.     set !NTN_InstallMode = $(SaveNTN_InstallMode)
  4641.     set !STF_INSTALL_MODE = $(SaveSTF_INSTALL_MODE)
  4642.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4643.         Debug-Output "OEMNSVRA.INF: INF "$(ThisInfName)" SHELL ERROR!"
  4644.         Goto InstallProtocolEscape
  4645.     Endif
  4646.     Set InstallProtocolStatus = $($R0)
  4647.     Ifstr(i) $(InstallProtocolStatus) != STATUS_SUCCESSFUL
  4648.         Ifstr(i) $(InstallProtocolStatus) != STATUS_USERCANCEL
  4649.             Debug-Output "OEMNSVRA.INF: INF "$(ThisInfName)" returned "$(InstallProtocolStatus)
  4650.             Goto InstallProtocolEscape
  4651.         Endif
  4652.     Endif
  4653. InstallProtocolEscape = +
  4654.     set Status = $(InstallProtocolStatus)
  4655.     return $(Status)
  4656. [UpgradeSelectedProtocols]
  4657.     Debug-Output "UpgradeSelectedProtocols entry."
  4658.     set Status   = STATUS_FAILED
  4659.     Set KeyNull  = ""
  4660.     set RasKeyName =  $(!NTN_SoftwareBase)"\Microsoft\Ras"
  4661.     set RasProtocolName =  $(!NTN_SoftwareBase)"\Microsoft\Ras\Protocols"
  4662.     set RasServiceParmName =  $(!NTN_ServiceBase)"\Remoteaccess\Parameters"
  4663.     set AsyMacServiceParmName = $(!NTN_ServiceBase)"\AsyncMac\Parameters"
  4664.     set RasManPPPName = $(!NTN_ServiceBase)"\RasMan\PPP"
  4665.     set GtwyEnabled = 1
  4666.     OpenRegKey $(!REG_H_LOCAL) "" $(RasServiceParmName) $(!MAXIMUM_ALLOWED) KeyParam
  4667.     ifstr $(KeyParam) != $(KeyNull)
  4668.         GetRegValue $(KeyParam), "NetBiosGatewayEnabled", GtwyEnabledList
  4669.         ifint $(RegLastError) == 0
  4670.             set GtwyEnabled = *($(GtwyEnabledList), 4)
  4671.         endif
  4672.         CloseRegKey $(KeyParam)
  4673.     else
  4674.         Debug-Output "UpgradeSelectedProtocols: error opening RemoteAccess\Parameters key"
  4675.     endif
  4676.     set DialinNBF    = 0
  4677.     set DialinIP     = 0
  4678.     set DialoutNBF   = 0
  4679.     set DialoutIP    = 0
  4680.     set DialinoutIPX = 0
  4681.     OpenRegKey $(!REG_H_LOCAL) "" $(AsyMacServiceParmName) $(!MAXIMUM_ALLOWED) KeyParam
  4682.     ifstr $(KeyParam) != $(KeyNull)
  4683.         GetRegValue $(KeyParam), "DialinNBF", DialinNBFList
  4684.         ifint $(RegLastError) == 0
  4685.             set DialinNBF = *($(DialinNBFList), 4)
  4686.         endif
  4687.         GetRegValue $(KeyParam), "DialinIP", DialinIPList
  4688.         ifint $(RegLastError) == 0
  4689.             set DialinIP = *($(DialinIPList), 4)
  4690.         endif
  4691.         GetRegValue $(KeyParam), "DialoutNBF", DialoutNBFList
  4692.         ifint $(RegLastError) == 0
  4693.             set DialoutNBF = *($(DialoutNBFList), 4)
  4694.         endif
  4695.         GetRegValue $(KeyParam), "DialoutIP", DialoutIPList
  4696.         ifint $(RegLastError) == 0
  4697.             set DialoutIP = *($(DialoutIPList), 4)
  4698.         endif
  4699.         GetRegValue $(KeyParam), "DialinoutIPX", DialinoutIPXList
  4700.         ifint $(RegLastError) == 0
  4701.             set DialinoutIPX = *($(DialinoutIPXList), 4)
  4702.         endif
  4703.         CloseRegKey $(KeyParam)
  4704.     else
  4705.         Debug-Output "UpgradeSelectedProtocols: error opening AsyncMac\Parameters key"
  4706.     endif
  4707.     set fDownLevel = FALSE
  4708.     OpenRegKey $(!REG_H_LOCAL) "" $(RasProtocolName) $(!MAXIMUM_ALLOWED) RasProtocolKey
  4709.     ifstr $(RasProtocolKey) == $(KeyNull)
  4710.         set fDownLevel = TRUE
  4711.         OpenRegKey $(!REG_H_LOCAL) "" $(RasKeyName) $(!MAXIMUM_ALLOWED) RasKey
  4712.         CreateRegKey $(RasKey) {"Protocols",0,GenericClass} "" $(!MAXIMUM_ALLOWED) "" RasProtocolKey
  4713.         OpenRegKey $(RasKey) "" "Protocols" $(!MAXIMUM_ALLOWED) RasProtocolKey
  4714.         CloseRegKey $(RasKey)
  4715.     endif
  4716.     ifstr $(RasProtocolKey) != $(KeyNull)
  4717.         set MultilinkList = {}
  4718.         GetRegValue $(RasProtocolKey), "Multilink", MultiLinkList
  4719.         ifint $(RegLastError) != 0
  4720.            Debug-Output "Upgradeselectedprotocols: defaulting Multilink to 0"
  4721.            SetRegValue $(RasProtocolKey) {Multilink, 0, $(!REG_VT_DWORD), 0}
  4722.         endif
  4723.         set NetbeuiSelected = 0
  4724.         set NetbeuiAllowed  = 0
  4725.         set TcpIpSelected = 0
  4726.         set TcpIpAllowed = 0
  4727.         set IpxSelected = 0
  4728.         set IpxAllowed = 0
  4729.         ifint $(DialoutNBF) != 0
  4730.             set NetbeuiSelected = 1
  4731.         endif
  4732.         ifint $(GtwyEnabled) == 1
  4733.           ifint $(DialinNBF) != 0
  4734.             set NetbeuiAllowed = 1
  4735.           endif
  4736.         else
  4737.           ifint $(DialoutNBF) != 0
  4738.             set NetbeuiAllowed = 1
  4739.           endif
  4740.         endif
  4741.         ifstr(i) $(fDownLevel) != TRUE
  4742.           ifint $(DialoutIP) != 0
  4743.             set TcpIpSelected = 1
  4744.           endif
  4745.           ifint $(DialinIP) != 0
  4746.             set TcpIpAllowed = 1
  4747.           endif
  4748.           ifint $(DialinoutIPX) != 0
  4749.             set IpxSelected = 1
  4750.             set IpxAllowed  = 1
  4751.           endif
  4752.         endif
  4753.         set ItemList = {}
  4754.         GetRegValue $(RasProtocolKey), "fNetbeuiSelected", ItemList
  4755.         ifint $(RegLastError) != 0
  4756.            SetRegValue $(RasProtocolKey) {fNetbeuiSelected, 0,+
  4757.                                           $(!REG_VT_DWORD),$(NetbeuiSelected)}
  4758.         endif
  4759.         GetRegValue $(RasProtocolKey), "fTcpIpSelected", ItemList
  4760.         ifint $(RegLastError) != 0
  4761.            SetRegValue $(RasProtocolKey) {fTcpIpSelected, 0,+
  4762.                                           $(!REG_VT_DWORD),$(TcpIpSelected)}
  4763.         endif
  4764.         GetRegValue $(RasProtocolKey), "fIpxSelected", ItemList
  4765.         ifint $(RegLastError) != 0
  4766.            SetRegValue $(RasProtocolKey) {fIpxSelected, 0,+
  4767.                                           $(!REG_VT_DWORD),$(IpxSelected)}
  4768.         endif
  4769.         GetRegValue $(RasProtocolKey), "fNetbeuiAllowed", ItemList
  4770.         ifint $(RegLastError) != 0
  4771.            SetRegValue $(RasProtocolKey) {fNetbeuiAllowed, 0,+
  4772.                                           $(!REG_VT_DWORD),$(NetbeuiAllowed)}
  4773.         endif
  4774.         GetRegValue $(RasProtocolKey), "fTcpIpAllowed", ItemList
  4775.         ifint $(RegLastError) != 0
  4776.            SetRegValue $(RasProtocolKey) {fTcpIpAllowed, 0,+
  4777.                                           $(!REG_VT_DWORD),$(TcpIpAllowed)}
  4778.         endif
  4779.         GetRegValue $(RasProtocolKey), "fIpxAllowed", ItemList
  4780.         ifint $(RegLastError) != 0
  4781.            SetRegValue $(RasProtocolKey) {fIpxAllowed, 0,+
  4782.                                           $(!REG_VT_DWORD),$(IpxAllowed)}
  4783.         endif
  4784.         OpenRegKey $(RasProtocolKey) "" "NBF" $(!MAXIMUM_ALLOWED) NbfKey
  4785.         ifstr $(NbfKey) == $(KeyNull)
  4786.             CreateRegKey $(RasProtocolKey) {"NBF",0,GenericClass} "" $(!MAXIMUM_ALLOWED) "" NbfKey
  4787.             SetRegValue $(NbfKey) {NetBiosGatewayEnabled, 0,+
  4788.                                        $(!REG_VT_DWORD),$(GtwyEnabled)}
  4789.             CloseRegKey $(NbfKey)
  4790.         endif
  4791.         ifstr(i) $(fDownLevel) != TRUE
  4792.             OpenRegKey $(RasProtocolKey) "" "IP" $(!MAXIMUM_ALLOWED) IpKey
  4793.             ifstr $(IpKey) != $(KeyNull)
  4794.                 GetRegValue $(IpKey), "AllowNetworkAccess", ItemList
  4795.                 ifint $(RegLastError) != 0
  4796.                    SetRegValue $(IpKey) {AllowNetworkAccess, 0,+
  4797.                                               $(!REG_VT_DWORD),$(GtwyEnabled)}
  4798.                 endif
  4799.                 CloseRegKey $(IpKey)
  4800.             endif
  4801.             OpenRegKey $(RasProtocolKey) "" "IPX" $(!MAXIMUM_ALLOWED) IpxKey
  4802.             ifstr $(IpxKey) != $(KeyNull)
  4803.                 GetRegValue $(IpxKey), "AllowNetworkAccess", ItemList
  4804.                 ifint $(RegLastError) != 0
  4805.                 SetRegValue $(IpxKey) {AllowNetworkAccess, 0,+
  4806.                                            $(!REG_VT_DWORD),$(GtwyEnabled)}
  4807.                 endif
  4808.                 CloseRegKey $(IpxKey)
  4809.             endif
  4810.         endif
  4811.         set ForceEncryptedPassword = 2
  4812.         set ForceEncryptedData = 0
  4813.         ifstr(i) $(fDownLevel) != TRUE
  4814.             GetRegValue $(RasProtocolKey), "ForceEncryptedData", DataList
  4815.             ifint $(RegLastError) != 0
  4816.                 GetRegValue $(RasProtocolKey), "ForceEncryptedPassword", PasswdList
  4817.                 ifint $(RegLastError) == 0
  4818.                    set ForceEncryptedPassword = *($(PasswdList), 4)
  4819.                    ifint $(ForceEncryptedPassword) == 1
  4820.                        set ForceEncryptedPassword = 2
  4821.                    endif
  4822.                 endif
  4823.             else
  4824.                 goto  UpgradeSelectedProtocolsEnd
  4825.             endif
  4826.         endif
  4827.         SetRegValue $(RasProtocolKey) {ForceEncryptedPassword, 0,+
  4828.                                  $(!REG_VT_DWORD), $(ForceEncryptedPassword)}
  4829.         SetRegValue $(RasProtocolKey) {ForceEncryptedData, 0,+
  4830.                                  $(!REG_VT_DWORD), $(ForceEncryptedData)}
  4831. UpgradeSelectedProtocolsEnd =+
  4832.         CloseRegKey $(RasProtocolKey)
  4833.         set Status = STATUS_SUCCESSFUL
  4834.     else
  4835.         Debug-Output "UpgradeSelectedProtocols: error opening Ras\protocols key"
  4836.     endif
  4837.     Debug-Output "UpgradeSelectedProtocols exit."
  4838.     return $(Status)
  4839. [SaveSelectedProtocols]
  4840.     Debug-Output "SaveSelectedProtocols entry."
  4841.     set Status   = STATUS_FAILED
  4842.     Set KeyNull  = ""
  4843.     ifstr(i) $($0) == TRUE
  4844.         set NetbeuiSelected = 1
  4845.     else
  4846.         set NetbeuiSelected = 0
  4847.     endif
  4848.     ifstr(i) $($1) == TRUE
  4849.         set TcpIpSelected = 1
  4850.     else
  4851.         set TcpIpSelected = 0
  4852.     endif
  4853.     ifstr(i) $($2) == TRUE
  4854.         set IpxSelected = 1
  4855.     else
  4856.         set IpxSelected = 0
  4857.     endif
  4858.     ifstr(i) $($3) == TRUE
  4859.         set NetbeuiAllowed = 1
  4860.     else
  4861.         set NetbeuiAllowed = 0
  4862.     endif
  4863.     ifstr(i) $($4) == TRUE
  4864.         set TcpIpAllowed = 1
  4865.     else
  4866.         set TcpIpAllowed = 0
  4867.     endif
  4868.     ifstr(i) $($5) == TRUE
  4869.         set IpxAllowed = 1
  4870.     else
  4871.         set IpxAllowed = 0
  4872.     endif
  4873.     set RasKeyName =  $(!NTN_SoftwareBase)"\Microsoft\Ras"
  4874.     set RasProtocolName =  $(!NTN_SoftwareBase)"\Microsoft\Ras\Protocols"
  4875.     OpenRegKey $(!REG_H_LOCAL) "" $(RasProtocolName) $(!MAXIMUM_ALLOWED) RasProtocolKey
  4876.     ifstr $(RasProtocolKey) == $(KeyNull)
  4877.         OpenRegKey $(!REG_H_LOCAL) "" $(RasKeyName) $(!MAXIMUM_ALLOWED) RasKey
  4878.         CreateRegKey $(RasKey) {"Protocols",0,GenericClass} "" $(!MAXIMUM_ALLOWED) "" RasProtocolKey
  4879.         OpenRegKey $(RasKey) "" "Protocols" $(!MAXIMUM_ALLOWED) RasProtocolKey
  4880.         CloseRegKey $(RasKey)
  4881.     endif
  4882.     ifstr $(RasProtocolKey) != $(KeyNull)
  4883.         SetRegValue $(RasProtocolKey) {fNetbeuiSelected, 0,+
  4884.                                        $(!REG_VT_DWORD),$(NetbeuiSelected)}
  4885.         SetRegValue $(RasProtocolKey) {fTcpIpSelected, 0,+
  4886.                                        $(!REG_VT_DWORD),$(TcpIpSelected)}
  4887.         SetRegValue $(RasProtocolKey) {fIpxSelected, 0,+
  4888.                                        $(!REG_VT_DWORD),$(IpxSelected)}
  4889.         SetRegValue $(RasProtocolKey) {fNetbeuiAllowed, 0,+
  4890.                                        $(!REG_VT_DWORD),$(NetbeuiAllowed)}
  4891.         SetRegValue $(RasProtocolKey) {fTcpIpAllowed, 0,+
  4892.                                        $(!REG_VT_DWORD),$(TcpIpAllowed)}
  4893.         SetRegValue $(RasProtocolKey) {fIpxAllowed, 0,+
  4894.                                        $(!REG_VT_DWORD),$(IpxAllowed)}
  4895.         CloseRegKey $(RasProtocolKey)
  4896.         set Status = STATUS_SUCCESSFUL
  4897.     else
  4898.         Debug-Output "error opening Ras\protocols key"
  4899.     endif
  4900.     Debug-Output "SaveSelectedProtocols exit."
  4901.     return $(Status)
  4902. [QuerySelectedProtocols]
  4903.     Debug-Output "QuerySelectedProtocols: entry"
  4904.     set Status   = STATUS_FAILED
  4905.     Set KeyNull  = ""
  4906.     set fNetbeuiSelected = FALSE
  4907.     set fTcpIpSelected   = FALSE
  4908.     set fIpxSelected     = FALSE
  4909.     set fNetbeuiAllowed  = FALSE
  4910.     set fTcpIpAllowed    = FALSE
  4911.     set fIpxAllowed      = FALSE
  4912.     set NetbeuiSelected  = {}
  4913.     set TcpIpSelected    = {}
  4914.     set IpxSelected      = {}
  4915.     set NetbeuiAllowed  = {}
  4916.     set TcpIpAllowed    = {}
  4917.     set IpxAllowed      = {}
  4918.     set RasKeyName =  $(!NTN_SoftwareBase)"\Microsoft\Ras\Protocols"
  4919.     OpenRegKey $(!REG_H_LOCAL) "" $(RasKeyName) $(!MAXIMUM_ALLOWED) RasKey
  4920.     ifstr $(RasKey) != $(KeyNull)
  4921.         GetRegValue $(RasKey), "fNetbeuiSelected", NetbeuiSelected
  4922.         ifint *($(NetbeuiSelected), 4) == 1
  4923.             set fNetbeuiSelected = TRUE
  4924.         else
  4925.             set fNetbeuiSelected = FALSE
  4926.         endif
  4927.         GetRegValue $(RasKey), "fTcpIpSelected", TcpIpSelected
  4928.         ifint *($(TcpIpSelected), 4) == 1
  4929.             set fTcpIpSelected = TRUE
  4930.         else
  4931.             set fTcpIpSelected = FALSE
  4932.         endif
  4933.         GetRegValue $(RasKey), "fIpxSelected", IpxSelected
  4934.         ifint *($(IpxSelected), 4) == 1
  4935.             set fIpxSelected = TRUE
  4936.         else
  4937.             set fIpxSelected = FALSE
  4938.         endif
  4939.         GetRegValue $(RasKey), "fNetbeuiAllowed", NetbeuiAllowed
  4940.         ifint *($(NetbeuiAllowed), 4) == 1
  4941.             set fNetbeuiAllowed = TRUE
  4942.         else
  4943.             set fNetbeuiAllowed = FALSE
  4944.         endif
  4945.         GetRegValue $(RasKey), "fTcpIpAllowed", TcpIpAllowed
  4946.         ifint *($(TcpIpAllowed), 4) == 1
  4947.             set fTcpIpAllowed = TRUE
  4948.         else
  4949.             set fTcpIpAllowed = FALSE
  4950.         endif
  4951.         GetRegValue $(RasKey), "fIpxAllowed", IpxAllowed
  4952.         ifint *($(IpxAllowed), 4) == 1
  4953.             set fIpxAllowed = TRUE
  4954.         else
  4955.             set fIpxAllowed = FALSE
  4956.         endif
  4957.         CloseRegKey $(RasKey)
  4958.         set Status = STATUS_SUCCESSFUL
  4959.     else
  4960.         Debug-Output "error opening Ras\protocols key"
  4961.     endif
  4962.     Debug-Output "QuerySelectedProtocols: exit"
  4963.     return $(Status) $(fNetbeuiSelected) $(fTcpIpSelected) $(fIpxSelected) +
  4964.                      $(fNetbeuiAllowed) $(fTcpIpAllowed) $(fIpxAllowed)
  4965. [UpdateSelectedProtocols]
  4966.     Debug-Output "UpdateSelectedProtocols: entry"
  4967.     set Status   = STATUS_FAILED
  4968.     Shell "" QuerySelectedProtocols
  4969.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4970.         Debug-Output "error shelling QuerySelectedProtocols."
  4971.         goto UpdateSelectedProtocolsEnd
  4972.     endif
  4973.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  4974.         Debug-Output "error returned by QuerySelectedProtocols."
  4975.         goto UpdateSelectedProtocolsEnd
  4976.     endif
  4977.     set fNetbeuiSelected = $($R1)
  4978.     set fTcpIpSelected   = $($R2)
  4979.     set fIpxSelected     = $($R3)
  4980.     set fNetbeuiAllowed = $($R4)
  4981.     set fTcpIpAllowed   = $($R5)
  4982.     set fIpxAllowed     = $($R6)
  4983.     Debug-Output "UpdateSelectedProtocols: Selected protocols NBF IP IPX "$(fNetbeuiSelected)" "$(fTcpIpSelected)" "$(fIpxSelected)
  4984.     shell "" QueryInstalledProtocols
  4985.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4986.         Debug-Output "error shelling QueryInstalledProtocols."
  4987.         goto UpdateSelectedProtocolsEnd
  4988.     endif
  4989.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  4990.         Debug-Output "error returned by QueryInstalledProtocols."
  4991.         goto UpdateSelectedProtocolsEnd
  4992.     endif
  4993.     set fNetbeuiInstalled = $($R1)
  4994.     set fTcpIpInstalled   = $($R2)
  4995.     set fIpxInstalled     = $($R3)
  4996.     Debug-Output "UpdateSelectedProtocols: Installed Protocols NBF IP IPX "$(fNetbeuiInstalled)" "$(fTcpIpInstalled)" "$(fIpxInstalled)
  4997.     set fNetbeuiSelectedNew = $(fNetbeuiSelected)
  4998.     set fTcpIpSelectedNew   = $(fTcpIpSelected)
  4999.     set fIpxSelectedNew     = $(fIpxSelected)
  5000.     set fNetbeuiAllowedNew = $(fNetbeuiAllowed)
  5001.     set fTcpIpAllowedNew   = $(fTcpIpAllowed)
  5002.     set fIpxAllowedNew     = $(fIpxAllowed)
  5003.     ifstr(i) $(fNetbeuiSelectedNew) == TRUE
  5004.         set fNetbeuiChosen = TRUE
  5005.     else
  5006.         set fNetbeuiChosen = $(fNetbeuiAllowedNew)
  5007.     endif
  5008.     ifstr(i) $(fTcpIpSelectedNew) == TRUE
  5009.         set fTcpIpChosen = TRUE
  5010.     else
  5011.         set fTcpIpChosen = $(fTcpIpAllowedNew)
  5012.     endif
  5013.     ifstr(i) $(fIpxSelectedNew) == TRUE
  5014.         set fIpxChosen = TRUE
  5015.     else
  5016.         set fIpxChosen = $(fIpxAllowedNew)
  5017.     endif
  5018.     ifstr(i) $(fNetbeuiInstalled) == FALSE
  5019.         set fNetbeuiSelectedNew = FALSE
  5020.         set fNetbeuiAllowedNew = FALSE
  5021.     endif
  5022.     ifstr(i) $(fTcpIpInstalled) == FALSE
  5023.         set fTcpIpSelectedNew = FALSE
  5024.         set fTcpIpAllowedNew = FALSE
  5025.     endif
  5026.     ifstr(i) $(fIpxInstalled) == FALSE
  5027.         set fIpxSelectedNew = FALSE
  5028.         set fIpxAllowedNew = FALSE
  5029.     endif
  5030.     ifstr(i) $(fNetbeuiSelectedNew) == $(fNetbeuiSelected)
  5031.       ifstr(i) $(fTcpIpSelectedNew) == $(fTcpIpSelected)
  5032.         ifstr(i) $(fIpxSelectedNew) == $(fIpxSelected)
  5033.           ifstr(i) $(fNetbeuiAllowedNew) == $(fNetbeuiAllowed)
  5034.             ifstr(i) $(fTcpIpAllowedNew) == $(fTcpIpAllowed)
  5035.               ifstr(i) $(fIpxAllowedNew) == $(fIpxAllowed)
  5036.                 set Status = STATUS_SUCCESSFUL
  5037.                 Debug-Output "UpdateSelectedProtocols: Nothing changed"
  5038.                 goto UpdateSelectedProtocolsEnd
  5039.               endif
  5040.             endif
  5041.           endif
  5042.         endif
  5043.       endif
  5044.     endif
  5045.     Shell "" SaveSelectedProtocols $(fNetbeuiSelectedNew) $(fTcpIpSelectedNew) +
  5046.                                    $(fIpxSelectedNew) $(fNetbeuiAllowedNew) +
  5047.                                    $(fTcpIpAllowedNew) $(fIpxAllowedNew)
  5048.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  5049.         Debug-Output "error shelling SaveSelectedProtocols."
  5050.         goto UpdateSelectedProtocolsEnd
  5051.     endif
  5052.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  5053.         Debug-Output "error returned by SaveSelectedProtocols."
  5054.         goto UpdateSelectedProtocolsEnd
  5055.     endif
  5056.     ifstr(i) $(fNetbeuiSelectedNew) == TRUE
  5057.         set fNetbeuiChosen = TRUE
  5058.     else
  5059.         set fNetbeuiChosen = $(fNetbeuiAllowedNew)
  5060.     endif
  5061.     ifstr(i) $(fTcpIpSelectedNew) == TRUE
  5062.         set fTcpIpChosen = TRUE
  5063.     else
  5064.         set fTcpIpChosen = $(fTcpIpAllowedNew)
  5065.     endif
  5066.     ifstr(i) $(fIpxSelectedNew) == TRUE
  5067.         set fIpxChosen = TRUE
  5068.     else
  5069.         set fIpxChosen = $(fIpxAllowedNew)
  5070.     endif
  5071.     Shell "" UpdateNetCardInfo $(fNetbeuiChosen) $(fTcpIpChosen) +
  5072.                                $(fIpxChosen)
  5073.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  5074.         Debug-Output "error shelling UpdateNetCardInfo."
  5075.         goto UpdateSelectedProtocolsEnd
  5076.     endif
  5077.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  5078.         Debug-Output "error returned by UpdateNetCardInfo."
  5079.         goto UpdateSelectedProtocolsEnd
  5080.     endif
  5081.     set Status = STATUS_SUCCESSFUL
  5082.     ifstr(i) $(fNetbeuiAllowedNew) == FALSE
  5083.         Debug-Output "UpdateSelectedProtocols: Removing RemoteAccess NBF dependency"
  5084.         Shell "" RemoveServiceDependency "RemoteAccess" "NBF"
  5085.     endif
  5086.     ifstr(i) $(fTcpIpChosen) == FALSE
  5087.         Debug-Output "UpdateSelectedProtocols: Removing RasArp service"
  5088.         shell "" RemoveRasArpService
  5089.     endif
  5090.     ifstr(i) $(fIpxAllowedNew) == FALSE
  5091.         Debug-Output "UpdateSelectedProtocols: Removing IPX router and SAP"
  5092.         shell "" RemoveNwlnkRipService
  5093.         shell "" RemoveIsnSapService
  5094.         Shell "" RemoveServiceDependency "RemoteAccess" "NWLNKIPX"
  5095.         ifstr(i) $($R0) == STATUS_FAILED
  5096.             Debug-Output "UpdateSelectedProtocols: error removing service dependency of RemoteAccess on NWLNKIPX"
  5097.         endif
  5098.     endif
  5099. UpdateSelectedProtocolsEnd = +
  5100.     Debug-Output "UpdateSelectedProtocols: exit"
  5101.     return $(Status) $(fNetbeuiChosen) $(fTcpIpChosen) $(fIpxChosen)
  5102. [UpgradeIsdnInfo]
  5103.     Debug-Output "UpgradeIsdnInfo entry."
  5104.     set Status   = STATUS_FAILED
  5105.     Set KeyNull  = ""
  5106.     set RasKeyName      =  $(!NTN_SoftwareBase)"\Microsoft\Ras"
  5107.     set TapiName        =  $(!NTN_SoftwareBase)"\Microsoft\Ras\Tapi Devices"
  5108.     set RasIsdnName     =  $(!NTN_SoftwareBase)"\Microsoft\Ras\MEDIA\ISDN"
  5109.     set RasManParamName =  $(!NTN_ServiceBase)"\RasMan\Parameters"
  5110.     set PcimacName      =  "HARDWARE\DEVICEMAP\TAPI DEVICES\PCIMAC"
  5111.     set KeyIsdn = $(KeyNull)
  5112.     OpenRegKey $(!REG_H_LOCAL) "" $(RasIsdnName) $(!MAXIMUM_ALLOWED) KeyIsdn
  5113.     ifstr $(KeyIsdn) != $(KeyNull)
  5114.         EnumRegKey $(KeyIsdn) PortList
  5115.         ifint $(RegLastError) != 0
  5116.             Debug-Output "UpgradeIsdnInfo: error enumerating MEDIAS\ISDN key."
  5117.             CloseRegKey $(KeyIsdn)
  5118.             set Status = STATUS_SUCCESSFUL
  5119.             goto UpgradeIsdnInfoEnd
  5120.         endif
  5121.         QueryListSize IsdnPorts $(PortList)
  5122.         ifint $(IsdnPorts) == 0
  5123.             set Status = STATUS_SUCCESSFUL
  5124.             CloseRegKey $(KeyIsdn)
  5125.             goto UpgradeIsdnInfoEnd
  5126.         endif
  5127.         set MediaType = "ISDN"
  5128.         set Addresses = {}
  5129.         OpenRegKey $(!REG_H_LOCAL) "" $(PcimacName) +
  5130.                                                $(!MAXIMUM_ALLOWED) KeyPcimac
  5131.         ifstr $(KeyPcimac) != $(KeyNull)
  5132.             GetRegValue $(KeyPcimac), "Address", AddressList
  5133.             ifint $(RegLastError) == 0
  5134.                 set Addresses = *($(AddressList), 4)
  5135.             endif
  5136.             GetRegValue $(KeyPcimac), "Media Type", MediaValue
  5137.             ifint $(RegLastError) == 0
  5138.                 set MediaType = *($(MediaValue), 4)
  5139.             endif
  5140.             CloseRegKey $(KeyPcimac)
  5141.         else
  5142.             Debug-Output "UpgradeIsdnInfo: error opening DEVICEMAP\TAPI DEVICES\PCIMAC key."
  5143.             CloseRegKey $(KeyIsdn)
  5144.             goto UpgradeIsdnInfoEnd
  5145.         endif
  5146.         set AddressList = {}
  5147.         set NameList    = {}
  5148.         set UsageList   = {}
  5149.         set index = 1
  5150.         forlistdo $(PortList)
  5151.            set Address =  *($(Addresses), $(index))
  5152.            set-add index = $(index) , 1
  5153.            set AddressList = >($(AddressList), $(Address))
  5154.            set PortName = *($($), 1)
  5155.            set NameList = >($(NameList), Pcimac$(PortName))
  5156.            OpenRegKey $(KeyIsdn) "" $(PortName) $(!MAXIMUM_ALLOWED) KeyPort
  5157.            ifstr $(KeyPort) != $(KeyNull)
  5158.              GetRegValue $(KeyPcimac), "Usage", UsageValue
  5159.              ifint $(RegLastError) == 0
  5160.                  set Usage = *($(UsageValue), 4)
  5161.                  set UsageList = >($(UsageList), $(Usage))
  5162.              else
  5163.                 Debug-Output "UpgradeIsdnInfo: error reading usage "$(PortName)
  5164.                 set UsageList = >($(UsageList), "Client")
  5165.              endif
  5166.              CloseRegKey $(KeyPort)
  5167.            else
  5168.              Debug-Output "UpgradeIsdnInfo: error opening key "$(PortName)
  5169.              set UsageList = >($(UsageList), "Client")
  5170.            endif
  5171.         endforlistdo
  5172.         set KeyTapi = $(KeyNull)
  5173.         CreateRegKey $(!REG_H_LOCAL) +
  5174.                  {$(TapiName),$(NoTitle),GenericClass}  +
  5175.                   "" $(!MAXIMUM_ALLOWED) "" KeyTapi
  5176.         ifstr $(KeyTapi) != $(KeyNull)
  5177.             CreateRegKey $(KeyTapi) +
  5178.                  {"Pcimac" ,$(NoTitle),GenericClass} +
  5179.                  "" $(!MAXIMUM_ALLOWED) "" KeyPcimac
  5180.             ifstr $(KeyPcimac) != $(KeyNull)
  5181.                 Debug-Output "UpgradeIsdnInfo: MediaType "$(MediaType)
  5182.                 Debug-Output "UpgradeIsdnInfo: Addresses "$(AddressList)
  5183.                 Debug-Output "UpgradeIsdnInfo: Names  "$(NameList)
  5184.                 Debug-Output "UpgradeIsdnInfo: Usage  "$(UsageList)
  5185.                 SetRegValue $(KeyPcimac) {"Media Type", 0, +
  5186.                                    $(!REG_VT_SZ),$(MediaType)}
  5187.                 SetRegValue $(KeyPcimac) {"Address", 0, +
  5188.                                    $(!REG_VT_MULTI_SZ),$(AddressList)}
  5189.                 SetRegValue $(KeyPcimac) {"Friendly Name", 0, +
  5190.                                    $(!REG_VT_MULTI_SZ),$(NameList)}
  5191.                 SetRegValue $(KeyPcimac) {"Usage", 0, +
  5192.                                    $(!REG_VT_MULTI_SZ),$(UsageList)}
  5193.                 CloseRegKey $(KeyPcimac)
  5194.             else
  5195.                 Debug-Output "UpgradeIsdnInfo: error creating RAS\TAPI DEVICES\Pcimac key"
  5196.             endif
  5197.         else
  5198.              Debug-Output "UpgradeIsdnInfo: error creating RAS\TAPI DEVICES key"
  5199.         endif
  5200.         CloseRegKey $(KeyIsdn)
  5201.         OpenRegKey $(!REG_H_LOCAL) "" $(RasKeyName) +
  5202.                                       $(!MAXIMUM_ALLOWED) KeyRas
  5203.         ifstr $(KeyRas) != $(KeyNull)
  5204.             DeleteRegTree $(KeyRas) "Media"
  5205.             CloseRegKey $(KeyRas)
  5206.         endif
  5207.         set KeyRasman = $(KeyNull)
  5208.         OpenRegKey $(!REG_H_LOCAL) "" $(RasManParamName) +
  5209.                                       $(!MAXIMUM_ALLOWED) KeyRasman
  5210.         ifstr $(KeyRasman) != $(KeyNull)
  5211.            GetRegValue $(KeyRasman), "Medias", MediaList
  5212.            ifint $(RegLastError) == 0
  5213.                set Medias = *($(MediaList), 4)
  5214.            else
  5215.                Debug-Output "UpgradeIsdnInfo: error reading Medias value "
  5216.            endif
  5217.            set NewMedias = {}
  5218.            forlistdo $(Medias)
  5219.                ifstr(i) $($) != "ISDN"
  5220.                   set NewMedias = >($(NewMedias), $($))
  5221.                endif
  5222.            endforlistdo
  5223.            set NewMedias = >($(NewMedias), "rastapi")
  5224.            Debug-Output "UpgradeIsdnInfo: NewMedias "$(NewMedias)
  5225.            SetRegValue $(KeyRasman) {"Medias", 0, +
  5226.                                    $(!REG_VT_MULTI_SZ),$(NewMedias)}
  5227.            CloseRegKey $(KeyRasman)
  5228.         else
  5229.           Debug-Output "UpgradeIsdnInfo: error opening Services\Rasman\Parameters key"
  5230.           goto UpgradeIsdnInfoEnd
  5231.         endif
  5232.         set Status = STATUS_SUCCESSFUL
  5233.     else
  5234.         set Status = STATUS_SUCCESSFUL
  5235.     endif
  5236. UpgradeIsdnInfoEnd = +
  5237.     Debug-Output "UpgradeIsdnInfo exit."
  5238.     return $(Status)
  5239. [UpdateNetCardInfo]
  5240.     Debug-Output "UpdateNetCardInfo: entry"
  5241.     set Status   = STATUS_FAILED
  5242.     Set KeyNull  = ""
  5243.     set fNetbeuiChosen = $($0)
  5244.     set fTcpIpChosen   = $($1)
  5245.     set fIpxChosen     = $($2)
  5246.     set RasAsyMacParamKeyName = $(!NTN_ServiceBase)"\AsyncMac\Parameters"
  5247.     OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) $(!MAXIMUM_ALLOWED) KeyNetcards
  5248.     ifstr $(KeyNetcards) == $(KeyNull)
  5249.          Debug-Output "UpdateNetCardInfo: could not open Netcards key"
  5250.          goto UpdateNetCardInfoEnd
  5251.     endif
  5252.     EnumRegKey $(KeyNetcards) NetcardsList
  5253.     set RemoveList  = {}
  5254.     ForListDo $(NetcardsList)
  5255.        set KeyName = *($($),1)
  5256.        OpenRegKey $(KeyNetcards) "" $(KeyName) $(!MAXIMUM_ALLOWED) Card
  5257.        ifstr $(Card) == $(KeyNull)
  5258.            Debug-Output "OEMNSVRA.INF: could not open netcard key"
  5259.            CloseRegKey $(KeyNetcards)
  5260.            goto UpdateNetCardInfoEnd
  5261.        endif
  5262.        GetRegValue $(Card), "ProductName" ProductNameInfo
  5263.        set CardProductName = *($(ProductNameInfo), 4)
  5264.        ifstr(i) $(fNetbeuiChosen) == FALSE
  5265.        ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINName)
  5266.               set RemoveList = >($(RemoveList), +
  5267.                  {$(!ProductNDISWANName),+
  5268.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  5269.        else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALOUTName)
  5270.               set RemoveList = >($(RemoveList), +
  5271.                  {$(!ProductNDISWANName),+
  5272.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  5273.            endif
  5274.        endif
  5275.        ifstr(i) $(fTcpIpChosen) == FALSE
  5276.        ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINIPName)
  5277.               set RemoveList = >($(RemoveList), +
  5278.                  {$(!ProductNDISWANName),+
  5279.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  5280.        else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALOUTIPName)
  5281.               set RemoveList = >($(RemoveList), +
  5282.                  {$(!ProductNDISWANName),+
  5283.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  5284.            endif
  5285.        endif
  5286.        ifstr(i) $(fIpxChosen) == FALSE
  5287.        ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINOUTIPXName)
  5288.               set RemoveList = >($(RemoveList), +
  5289.                  {$(!ProductNDISWANName),+
  5290.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  5291.            endif
  5292.        endif
  5293.        CloseRegKey $(Card)
  5294.     EndForListDo
  5295.     CloseRegKey $(KeyNetcards)
  5296.     QueryListSize NetCards $(RemoveList)
  5297.     ifint $(NetCards) != 0
  5298.         ForListDo  $(RemoveList)
  5299.             debug-output "Removing hardware component: "$($)
  5300.             Shell "utility.inf", RemoveHardwareComponent, +
  5301.                                  $(!Manufacturer), *($($),1), *($($),2)
  5302.         EndForListDo
  5303.     endif
  5304.     OpenRegKey $(!REG_H_LOCAL) "" $(RasAsyMacParamKeyName) $(!MAXIMUM_ALLOWED) KeyMacParams
  5305.     ifstr $(KeyMacParams) == $(KeyNull)
  5306.        Debug-Output "UpdateNetCardInfo: could not open AsyncMac Params key"
  5307.        goto UpdateNetCardInfoEnd
  5308.     endif
  5309.     set NewValueList = {}
  5310.     ifstr(i) $(fNetbeuiChosen) == FALSE
  5311.         set NewValueList =  >($(NewValueList), +
  5312.                              {DialinNBF, $(NoTitle), $(!REG_VT_DWORD), 0})
  5313.         set NewValueList = >($(NewValueList), +
  5314.                              {DialoutNBF, $(NoTitle), $(!REG_VT_DWORD), 0})
  5315.     endif
  5316.     ifstr(i) $(fTcpIpChosen) == FALSE
  5317.         set NewValueList = >($(NewValueList), +
  5318.                             {DialinIP, $(NoTitle), $(!REG_VT_DWORD), 0 })
  5319.         set NewValueList = >($(NewValueList), +
  5320.                             {DialoutIP, $(NoTitle), $(!REG_VT_DWORD), 0 })
  5321.     endif
  5322.     ifstr(i) $(fIpxChosen) == FALSE
  5323.         set NewValueList = >($(NewValueList), +
  5324.                             {DialinoutIPX, $(NoTitle), $(!REG_VT_DWORD), 0})
  5325.     endif
  5326.     Shell  "utility.inf", AddValueList, $(KeyMacParams), $(NewValueList)
  5327.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  5328.          Debug-Output "UpdateNetCardInfo:AddValueList bombed out"
  5329.          goto UpdateNetCardInfoEnd
  5330.     endif
  5331.     set RegistryErrorIndex = $($R0)
  5332.     CloseRegKey $(KeyMacParams)
  5333.     Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  5334.         goto UpdateNetCardInfoEnd
  5335.     endif
  5336.     set Status = STATUS_SUCCESSFUL
  5337. UpdateNetCardInfoEnd =+
  5338.     Debug-Output "UpdateNetcardInfo: Exit"
  5339.     return $(Status)
  5340. [UpdateNdisWanInfo]
  5341.     Debug-Output "UpdateNdisWanNetInfo: entry"
  5342.     set Status   = STATUS_FAILED
  5343.     Set KeyNull  = ""
  5344.     set NdisWanName = $(!NTN_SoftwareBase)"\Microsoft\NdisWan\CurrentVersion"
  5345.     set NdisWanRulesName = $(!NTN_SoftwareBase)"\Microsoft\NdisWan\CurrentVersion\NetRules"
  5346.     set NdisWanSvcName = $(!NTN_ServiceBase)"\NdisWan"
  5347.     set RasManLinkageName = $(!NTN_ServiceBase)"\RasMan\Linkage"
  5348.     OpenRegKey $(!REG_H_LOCAL) "" $(NdisWanName) $(!MAXIMUM_ALLOWED) KeyNdisWan
  5349.     ifstr $(KeyNdisWan) != $(KeyNull)
  5350.         SetRegValue $(KeyNdisWan) {Description, 0, +
  5351.                 $(!REG_VT_SZ),$(!ProductNDISWANDescription)}
  5352.         SetRegValue $(KeyNdisWan) {PathName, 0, +
  5353.                 $(!REG_VT_SZ),$(!ProductNDISWANImagePath)}
  5354.         SetRegValue $(KeyNdisWan) {ServiceName, 0, +
  5355.                 $(!REG_VT_SZ),$(!ProductNDISWANName)}
  5356.         SetRegValue $(KeyNdisWan) {Title, 0, +
  5357.                 $(!REG_VT_SZ),$(!ProductNDISWANTitle)}
  5358.         CloseRegKey $(KeyNdisWan)
  5359.     else
  5360.         Debug-Output "UpdateNdisWanInfo: could not open NdisWan key"
  5361.     endif
  5362.     OpenRegKey $(!REG_H_LOCAL) "" $(NdisWanRulesName) $(!MAXIMUM_ALLOWED) KeyRules
  5363.     ifstr $(KeyRules) != $(KeyNull)
  5364.         SetRegValue $(KeyRules) {bindable, 0, +
  5365.                 $(!REG_VT_MULTI_SZ),$(!NetRuleNDISWANBindable)}
  5366.         SetRegValue $(KeyRules) {bindform, 0, +
  5367.                 $(!REG_VT_SZ),$(!NetRuleNDISWANBindForm)}
  5368.         SetRegValue $(KeyRules) {class, 0, +
  5369.                 $(!REG_VT_MULTI_SZ),$(!NetRuleNDISWANClass)}
  5370.         SetRegValue $(KeyRules) {type, 0, +
  5371.                 $(!REG_VT_SZ),$(!NetRuleNDISWANType)}
  5372.         SetRegValue $(KeyRules) {InfOption, 0, +
  5373.                 $(!REG_VT_SZ), "NDISWAN"}
  5374.         CloseRegKey $(KeyRules)
  5375.     else
  5376.         Debug-Output "UpdateNdisWanInfo: could not open NdisWan NetRules key"
  5377.     endif
  5378.     OpenRegKey $(!REG_H_LOCAL) "" $(NdisWanSvcName) $(!MAXIMUM_ALLOWED) KeyService
  5379.     ifstr $(KeyService) != $(KeyNull)
  5380.         SetRegValue $(KeyService) {DisplayName, 0, +
  5381.                 $(!REG_VT_SZ),$(!ProductNDISWANDisplayName)}
  5382.         SetRegValue $(KeyService) {ImagePath, 0, +
  5383.                 $(!REG_VT_EXPAND_SZ),$(!ProductNDISWANImagePath)}
  5384.         SetRegValue $(KeyService) {Start, 0, $(!REG_VT_DWORD),2}
  5385.         SetRegValue $(KeyService) {Group, 0, $(!REG_VT_SZ), "NDISWAN"}
  5386.         DeleteRegValue $(KeyService) "DependOnService"
  5387.         DeleteRegValue $(KeyService) "DependOnGroup"
  5388.         OpenRegKey $(KeyService) "" "Linkage" $(!MAXIMUM_ALLOWED) KeyLinkage
  5389.         ifstr $(KeyLinkage) != $(KeyNull)
  5390.             DeleteRegValue $(KeyLinkage) "OtherDependencies"
  5391.             CloseRegKey $(KeyLinkage)
  5392.         endif
  5393.         CloseRegKey $(KeyService)
  5394.     else
  5395.         Debug-Output "UpdateNdisWanInfo: could not open NdisWan services key"
  5396.     endif
  5397.     Shell "" RemoveServiceDependency "RasMan" "RasHub"
  5398.     set Status   = STATUS_SUCCESSFUL
  5399. UpdateNdisWanInfoEnd =+
  5400.     Debug-Output "UpdateNdisWanInfo: Exit"
  5401.     return $(Status)
  5402. [UpdateAsyncMacNetRules]
  5403.     Debug-Output "UpdateAsyncMacNetRules: entry"
  5404.     set Status   = STATUS_FAILED
  5405.     Set KeyNull  = ""
  5406.     set AsyncMacRulesName = $(!NTN_SoftwareBase)"\Microsoft\AsyncMac\CurrentVersion\NetRules"
  5407.     OpenRegKey $(!REG_H_LOCAL) "" $(AsyncMacRulesName) $(!MAXIMUM_ALLOWED) KeyRules
  5408.     ifstr $(KeyRules) != $(KeyNull)
  5409.         set Status   = STATUS_SUCCESSFUL
  5410.         SetRegValue $(KeyRules) {bindable, 0, +
  5411.                 $(!REG_VT_MULTI_SZ),$(!NetRuleRASASYMACBindable)}
  5412.         CloseRegKey $(KeyRules)
  5413.     else
  5414.         Debug-Output "UpdateAsyncMacNetRules: could not open NdisWan NetRules key"
  5415.     endif
  5416.     Debug-Output "UpdateAsyncMacNetRules: Exit"
  5417.     return $(Status)
  5418. [UpdateAsyncMacParameters]
  5419.     Debug-Output "UpdateAsyncMacParameters: entry"
  5420.     set Status   = STATUS_SUCCESSFUL
  5421.     Set KeyNull  = ""
  5422.     set RasAsyMacParamKeyName = $(!NTN_ServiceBase)"\AsyncMac\Parameters"
  5423.     OpenRegKey $(!REG_H_LOCAL) "" $(RasAsyMacParamKeyName) $(!MAXIMUM_ALLOWED) KeyMacParams
  5424.     ifstr $(KeyMacParams) != $(KeyNull)
  5425.         GetRegValue $(KeyMacParams), "DialinNBF" DialinNBFInfo
  5426.         Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  5427.             GetRegValue $(KeyMacParams), "Dialin" DialinNBFInfo
  5428.             set PrevNumDialinNBF  = *($(DialinNBFInfo), 4)
  5429.             SetRegValue $(KeyMacParams) {DialinNBF, 0, +
  5430.                                         $(!REG_VT_DWORD),$(PrevNumDialinNBF)}
  5431.             Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  5432.                 Debug-Output "UpdateAsyncMacParameters: deleting dialin key"
  5433.                 DeleteRegValue $(KeyMacParams) "Dialin"
  5434.             endif
  5435.         endif
  5436.         GetRegValue $(KeyMacParams), "DialoutNBF" DialoutNBFInfo
  5437.         Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  5438.             GetRegValue $(KeyMacParams), "Dialout" DialoutNBFInfo
  5439.             set PrevNumDialoutNBF    = *($(DialoutNBFInfo), 4)
  5440.             SetRegValue $(KeyMacParams) {DialoutNBF, 0, +
  5441.                                         $(!REG_VT_DWORD),$(PrevNumDialoutNBF)}
  5442.             Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  5443.                 Debug-Output "UpdateAsyncMacParameters: deleting dialout key"
  5444.                 DeleteRegValue $(KeyMacParams) "Dialout"
  5445.             endif
  5446.         endif
  5447.         CloseRegKey $(KeyMacParams)
  5448.     else
  5449.         Debug-Output "OEMNSVRA.INF: could not open AsyncMac Params key"
  5450.     endif
  5451.     Debug-Output "UpdateAsyncMacParameters: Exit"
  5452.     return $(Status)
  5453. [UpdateAsyncMacStartType]
  5454.     Debug-Output "UpdateAsyncMacStartType: entry"
  5455.     set Status   = STATUS_SUCCESSFUL
  5456.     Set KeyNull  = ""
  5457.     set RasAsyMacKeyName = $(!NTN_ServiceBase)"\AsyncMac"
  5458.     OpenRegKey $(!REG_H_LOCAL) "" $(RasAsyMacKeyName) $(!MAXIMUM_ALLOWED) KeyMac
  5459.     ifstr $(KeyMac) != $(KeyNull)
  5460.         GetRegValue $(KeyMac), "Start" StartValue
  5461.         Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  5462.             set Start = *($(StartValue), 4)
  5463.             ifint $(Start) == 3
  5464.                 set Start = 2
  5465.                 SetRegValue $(KeyMac) {Start, 0, $(!REG_VT_DWORD), $(Start)}
  5466.             endif
  5467.         endif
  5468.         CloseRegKey $(KeyMac)
  5469.     else
  5470.         Debug-Output "OEMNSVRA.INF: could not open AsyncMac key"
  5471.     endif
  5472.     Debug-Output "UpdateAsyncMacStartType: Exit"
  5473.     return $(Status)
  5474. [UpdatePerfmonInfo]
  5475.     Debug-Output "UpdatePerfmonInfo: entry"
  5476.     set Status   = STATUS_FAILED
  5477.     Set KeyNull  = ""
  5478.     set RemoteAccessService = $(!NTN_ServiceBase)"\RemoteAccess"
  5479.     OpenRegKey $(!REG_H_LOCAL) "" $(RemoteAccessService) $(!MAXIMUM_ALLOWED) KeyService
  5480.     ifstr $(KeyService) != $(KeyNull)
  5481.         Shell "" UpdatePerfmonInfoHelper $(KeyService)
  5482.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  5483.             Debug-Output "error shelling UpdatePerfmonInfoHelper."
  5484.             goto UpdatePerfmonInfoEnd
  5485.         endif
  5486.         Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  5487.             Debug-Output "error returned by UpdatePerfmonInfo."
  5488.             goto UpdatePerfmonInfoEnd
  5489.         endif
  5490.         CloseRegKey $(KeyService)
  5491.         set Status = STATUS_SUCCESSFUL
  5492.     else
  5493.         Debug-Output "UpdatePerfmonInfo: error opening RemoteAccess service key"
  5494.     endif
  5495. UpdatePerfmonInfoEnd =+
  5496.     Debug-Output "UpdatePerfmonInfo: Exit"
  5497.     return $(Status)
  5498. [UpdatePerfmonInfoHelper]
  5499.     Debug-Output "UpdatePerfmonInfoHelper: entry"
  5500.     set Status   = STATUS_FAILED
  5501.     Set KeyNull  = ""
  5502.     set ServiceKey = $($0)
  5503.     set KeyPerformance = $(KeyNull)
  5504.     OpenRegKey $(ServiceKey) "" $(!RasPerfKeyName) $(!MAXIMUM_ALLOWED) KeyPerformance
  5505.     ifstr $(KeyPerformance) == $(KeyNull)
  5506.         CreateRegKey $(ServiceKey) {$(!RasPerfKeyName),$(NoTitle),GenericClass} "" $(!MAXIMUM_ALLOWED) "" KeyPerformance
  5507.         OpenRegKey $(ServiceKey) "" $(!RasPerfKeyName) $(!MAXIMUM_ALLOWED) KeyPerformance
  5508.         ifstr $(KeyPerformance) == $(KeyNull)
  5509.             Debug-Output "Error creating Performance key"
  5510.             goto UpdatePerfmonInfoHelperEnd
  5511.         endif
  5512.     endif
  5513.     set NewValueList = +
  5514.          {{Library ,$(NoTitle),$(!REG_VT_SZ),$(!RasPerfLibraryName)},+
  5515.          {Open, $(NoTitle),$(!REG_VT_SZ),$(!RasPerfOpenFunction)},+
  5516.          {Close, $(NoTitle),$(!REG_VT_SZ),$(!RasPerfCloseFunction)},+
  5517.          {Collect, $(NoTitle),$(!REG_VT_SZ),$(!RasPerfCollectFunction)}}
  5518.     Shell  "Utility.Inf", AddValueList, $(KeyPerformance), $(NewValueList)
  5519.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  5520.          Debug-Output "UpdatePerfmonInfoHelper: error shelling AddValueList"
  5521.          goto UpdatePerfmonInfoHelperEnd
  5522.     endif
  5523.     set RegistryErrorIndex = $($R0)
  5524.     Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  5525.         Debug-Output "UpdatePerfmonInfoHelper: AddValueList bombed out"
  5526.         goto UpdatePerfmonInfoHelperEnd
  5527.     endif
  5528.     CloseRegKey $(KeyPerformance)
  5529.     set Status = STATUS_SUCCESSFUL
  5530. UpdatePerfmonInfoHelperEnd =+
  5531.     Debug-Output "UpdatePerfmonInfoHelper: Exit"
  5532.     return $(Status)
  5533. [RenameRasHubToNdisWan]
  5534.     Debug-Output "RenameRasHubToNdisWan: entry"
  5535.     set Status   = STATUS_FAILED
  5536.     Set KeyNull  = ""
  5537.     OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) $(!MAXIMUM_ALLOWED) KeyNetcards
  5538.     ifstr $(KeyNetcards) == $(KeyNull)
  5539.          Debug-Output "RenameRasHubToNdisWan: could not open Netcards key"
  5540.          goto RenameRasHubToNdisWanEnd
  5541.     endif
  5542.     EnumRegKey $(KeyNetcards) NetcardsList
  5543.     ForListDo $(NetcardsList)
  5544.        set KeyName = *($($),1)
  5545.        OpenRegKey $(KeyNetcards) "" $(KeyName) $(!MAXIMUM_ALLOWED) Card
  5546.        ifstr $(Card) == $(KeyNull)
  5547.            Debug-Output "RenameRasHubToNdisWan: could not open netcard key"
  5548.            CloseRegKey $(KeyNetcards)
  5549.            goto RenameRasHubToNdisWanEnd
  5550.        endif
  5551.        GetRegValue $(Card), "ProductName" ProductNameInfo
  5552.        set CardProductName = *($(ProductNameInfo), 4)
  5553.        ifstr(i) $(CardProductName) == $(!ProductRASHUBDIALINName)
  5554.            set ThisOption = DIALIN
  5555.        else-ifstr(i) $(CardProductName) == $(!ProductRASHUBDIALOUTName)
  5556.            set ThisOption = DIALOUT
  5557.        else-ifstr(i) $(CardProductName) == $(!ProductRASHUBDIALINIPName)
  5558.            set ThisOption = DIALINIP
  5559.        else-ifstr(i) $(CardProductName) == $(!ProductRASHUBDIALOUTIPName)
  5560.            set ThisOption = DIALOUTIP
  5561.        else-ifstr(i) $(CardProductName) == $(!ProductRASHUBDIALINOUTIPXName)
  5562.            set ThisOption = DIALINOUTIPX
  5563.        else
  5564.            goto endloop
  5565.        endif
  5566.        SetRegValue $(Card) {ProductName, 0, +
  5567.                             $(!REG_VT_SZ),$(!ProductNDISWAN$(ThisOption)Name)}
  5568.        SetRegValue $(Card) {Description, 0, +
  5569.                             $(!REG_VT_SZ),$(!ProductNDISWANDescription)}
  5570.        SetRegValue $(Card) {ServiceName, 0, $(!REG_VT_SZ), +
  5571.                             $(!ProductNDISWANName)$(KeyName)}
  5572.        SetRegValue $(Card) {Title, 0, $(!REG_VT_SZ),+
  5573.                             "["$(KeyName)"] "$(!ProductNDISWANTitle)}
  5574.        OpenRegKey $(Card) "" "NetRules" $(!MAXIMUM_ALLOWED) NetRules
  5575.        ifstr $(NetRules) == $(KeyNull)
  5576.            CloseRegKey $(KeyNetCards)
  5577.            CloseRegKey $(Card)
  5578.            Debug-Output "RenameRasHubToNdisWan: could not open "$(KeyName)"\NetRules key"
  5579.            goto RenameRasHubToNdisWanEnd
  5580.        Endif
  5581.        SetRegValue $(NetRules) {InfOption, 0, +
  5582.                             $(!REG_VT_SZ), "NDISWAN"}
  5583.        SetRegValue $(NetRules) {block, 0, +
  5584.                             $(!REG_VT_MULTI_SZ),$(!NetRuleHardware$(ThisOption)Block)}
  5585.        SetRegValue $(NetRules) {class, 0, +
  5586.                             $(!REG_VT_MULTI_SZ),$(!NetRuleHardware$(ThisOption)Class)}
  5587.        SetRegValue $(NetRules) {type, 0, +
  5588.                             $(!REG_VT_SZ),$(!NetRuleHardware$(ThisOption)Type)}
  5589.        Set TempProdName = """"$(!ProductNDISWANName)$(KeyName)""""
  5590.        Set TempBindForm = $(TempProdName)$(!NetRuleHardwareNDISWANBindForm)
  5591.        SetRegValue $(NetRules) {bindform, 0, $(!REG_VT_SZ),$(TempBindForm)}
  5592.        CloseRegKey $(NetRules)
  5593. endloop=+
  5594.        CloseRegKey $(Card)
  5595.     EndForListDo
  5596.     CloseRegKey $(KeyNetcards)
  5597.     set Status = STATUS_SUCCESSFUL
  5598. RenameRasHubToNdisWanEnd =+
  5599.     Debug-Output "RenameRasHubToNdisWan: Exit"
  5600.     return $(Status)
  5601. [UpgradeIpxInfo]
  5602.     Debug-Output "UpgradeIpxInfo: entry"
  5603.     set PORTSDLGHANDLE = $($0)
  5604.     set RasProtocolsName = $(!NTN_SoftwareBase)"\Microsoft\Ras\Protocols"
  5605.     set SapAgentName     = $(!NTN_SoftwareBase)"\Microsoft\NWSAPAGENT"
  5606.     set NwlnkRipName     = $(!NTN_SoftwareBase)"\Microsoft\NWLNKRIP"
  5607.     set IpxRouterName    = $(!NTN_ServiceBase)"\IpxRouter"
  5608.     OpenRegKey $(!REG_H_LOCAL) "" +
  5609.                       $(RasProtocolsName) $(!MAXIMUM_ALLOWED) KeyProtocols
  5610.     ifstr $(KeyProtocols) != ""
  5611.         set fIpxAllowed = 0
  5612.         GetRegValue $(KeyProtocols) "fIpxAllowed" IpxList
  5613.         ifint $(RegLastError) == 0
  5614.             set fIpxAllowed = *($(IpxList), 4)
  5615.         endif
  5616.         ifint $(fIpxAllowed) != 0
  5617.             Debug-Output "UpgradeIpxInfo: RAS is configured for IPX dialin"
  5618.             set KeyRouter = ""
  5619.             OpenRegKey $(!REG_H_LOCAL) "" +
  5620.                       $(IpxRouterName) $(!MAXIMUM_ALLOWED) KeyRouter
  5621.             ifstr $(KeyRouter) !=  ""
  5622.                 CloseRegKey $(KeyRouter)
  5623.                 Debug-Output "Renaming IpxRouter to NwlnkRip..."
  5624.                 LibraryProcedure Result $(PORTSDLGHANDLE) RenameIpxRouterToNwlnkRip
  5625.                 Shell "" RemoveServiceDependency "RemoteAccess" "IpxRouter"
  5626.                 Shell "" AddServiceDependency "RemoteAccess" "NwlnkRip"
  5627.                 Debug-Output "Renaming IpxRouter to NwlnkRip done..."
  5628.             endif
  5629.             OpenRegKey $(!REG_H_LOCAL) "" $(!RasIsnRipKeyName) +
  5630.                                           $(!MAXIMUM_ALLOWED) KeyService
  5631.             ifstr $(KeyService) != ""
  5632.                 OpenRegKey $(KeyService) "" "Parameters" +
  5633.                                         $(!MAXIMUM_ALLOWED) KeyParams
  5634.                 ifstr(i) $(KeyParams) != ""
  5635.                    GetRegValue $(KeyParams) "NetbiosRouting" NetbiosRoutingInfo
  5636.                    Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  5637.                       set NetbiosRouting = *($(NetbiosRoutingInfo), 4)
  5638.                    else
  5639.                       set NetbiosRouting = 2
  5640.                    endif
  5641.                    set NetbiosRouting = *($(NetbiosRoutingInfo), 4)
  5642.                    ifint $(NetbiosRouting) == 0
  5643.                       set NetbiosRouting = 2
  5644.                    else-ifint $(NetbiosRouting) == 1
  5645.                       set NetbiosRouting = 3
  5646.                    endif
  5647.                    SetRegValue $(KeyParams) {"NetbiosRouting" , 0, $(!REG_VT_DWORD), $(NetbiosRouting)}
  5648.                 endif
  5649.                 OpenRegKey $(KeyService) "" "Parameters\UseRef" +
  5650.                                             $(!MAXIMUM_ALLOWED) KeyUseRef
  5651.                 ifstr(i) $(KeyUseRef) == ""
  5652.                     ifstr(i) $(KeyParams) != ""
  5653.                        CreateRegKey $(KeyParams) {"UseRef", 0, GenericClass} +
  5654.                                           "" $(!MAXIMUM_ALLOWED) "" KeyUseRef
  5655.                        CloseRegKey $(KeyParams)
  5656.                     endif
  5657.                 endif
  5658.                 ifstr(i) $(KeyUseRef) != ""
  5659.                     SetRegValue $(KeyUseRef) {"RAS" , 0, $(!REG_VT_SZ), "1"}
  5660.                     CloseRegKey $(KeyUseRef)
  5661.                 endif
  5662.                 CloseRegKey $(KeyService)
  5663.             endif
  5664.             OpenRegKey $(!REG_H_LOCAL) "" $(SapAgentName) +
  5665.                                           $(!MAXIMUM_ALLOWED) KeyService
  5666.             ifstr $(KeyService) == ""
  5667.                 OpenRegKey $(!REG_H_LOCAL) "" $(!RasIsnSapKeyName) +
  5668.                                               $(!MAXIMUM_ALLOWED) KeySap
  5669.                 Ifstr(i) $(KeySap) != ""
  5670.                     Shell "utility.inf", RemoveService +
  5671.                                          $(!ProductRASISNSAPName) "YES"
  5672.                     Shell "" InstallIsnSapService
  5673.                 endif
  5674.                 CloseRegKey $(KeySap)
  5675.             else
  5676.                 CloseRegKey $(KeyService)
  5677.             endif
  5678.             OpenRegKey $(!REG_H_LOCAL) "" $(NwlnkRipName) +
  5679.                                           $(!MAXIMUM_ALLOWED) KeyService
  5680.             ifstr $(KeyService) == ""
  5681.                 OpenRegKey $(!REG_H_LOCAL) "" $(!RasIsnRipKeyName) +
  5682.                                               $(!MAXIMUM_ALLOWED) KeyRip
  5683.                 Ifstr(i) $(KeyRip) != ""
  5684.                     Shell "" InstallNwlnkRipService
  5685.                 CloseRegKey $(KeyRip)
  5686.             else
  5687.                 CloseRegKey $(KeyService)
  5688.             endif
  5689.             OpenRegKey $(!REG_H_LOCAL) ""  +
  5690.                        $(!NTN_ServiceBase)"\NWLNKIPX\Parameters"  +
  5691.                        $(!MAXIMUM_ALLOWED) KeyIpxParameters
  5692.             ifstr $(KeyIpxParameters) != $(KeyNull)
  5693.                 GetRegValue $(KeyIpxParameters), "SingleNetworkActive"  +
  5694.                             SingleNetworkActive
  5695.                 ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  5696.                     SetRegValue $(KeyIpxParameters) +
  5697.                                 {SingleNetworkActive, 0, $(!REG_VT_DWORD), 1}
  5698.                 endif
  5699.                 GetRegValue $(KeyIpxParameters), "DisableDialoutSap"  +
  5700.                             DisableDialoutSap
  5701.                 ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  5702.                     SetRegValue $(KeyIpxParameters) +
  5703.                                 {DisableDialoutSap, 0, $(!REG_VT_DWORD), 1}
  5704.                 endif
  5705.                 GetRegValue $(KeyIpxParameters), "DisableDialinNetbios"  +
  5706.                             DisableDialinNetbios
  5707.                 ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  5708.                     SetRegValue $(KeyIpxParameters) +
  5709.                                 {DisableDialinNetbios, 0, $(!REG_VT_DWORD), 1}
  5710.                 endif
  5711.                 CloseRegKey $(KeyIpxParameters)
  5712.             Endif
  5713.             else
  5714.                 Debug-Output "OEMNSVRA.INF: error opening NWLNKIPX\Parameters key"
  5715.             endif
  5716.         endif
  5717.         CloseRegKey $(KeyProtocols)
  5718.     else
  5719.         Debug-Output "UpgradeIpxInfo: error opening RAS\Protocols key"
  5720.     endif
  5721.     Debug-Output "UpgradeIpxInfo: exit"
  5722.     return
  5723. [SaveTcpipInfo]
  5724.     Debug-Output "SaveTcpipInfo: entry - AddIpInfo = "$($0)
  5725.     set AddTcpInfo = $($0)
  5726.     set Status     = STATUS_FAILED
  5727.     Set KeyNull    = ""
  5728.     set RasIpKeyName =  $(!NTN_SoftwareBase)"\Microsoft\Ras\Protocols\Ip"
  5729.     set RasSvrParamKeyName = $(!NTN_ServiceBase)"\RemoteAccess\Parameters"
  5730.     OpenRegKey $(!REG_H_LOCAL) "" $(RasIpKeyName) $(!MAXIMUM_ALLOWED) RasIpKey
  5731.     ifstr $(RasIpKey) != $(KeyNull)
  5732.         OpenRegKey $(!REG_H_LOCAL) "" $(RasSvrParamKeyName) $(!MAXIMUM_ALLOWED) KeySrvParams
  5733.         ifstr $(KeySrvParams) == $(KeyNull)
  5734.            Debug-Output "SaveTcpipInfo: could not open RasSvr Params key"
  5735.            CloseRegKey $(RasIpKey)
  5736.            return $(Status)
  5737.         endif
  5738.         ifstr(i) $(AddTcpInfo) == TRUE
  5739.             CreateRegKey $(KeySrvParams) {"Ip",$(NoTitle),GenericClass} "" $(!MAXIMUM_ALLOWED) "" RemoteIpKey
  5740.             OpenRegKey $(KeySrvParams) "" "Ip" $(!MAXIMUM_ALLOWED) RemoteIpKey
  5741.             ifstr $(RemoteIpKey) != $(KeyNull)
  5742.                EnumRegValue $(RasIpKey) NewValueList
  5743.                Shell  "utility.inf", AddValueList, $(RemoteIpKey), $(NewValueList)
  5744.                CloseRegKey $(RemoteIpKey)
  5745.             endif
  5746.         else
  5747.             Debug-Output "SaveTpcipInfo: removing ip info"
  5748.             DeleteRegTree $(KeySrvParams) "IP"
  5749.         endif
  5750.         CloseRegKey $(RasIpKey)
  5751.         CloseRegKey $(KeySrvParams)
  5752.     endif
  5753.     Debug-Output "SaveTcpipInfo: exit"
  5754.     set Status = STATUS_SUCCESSFUL
  5755.     return $(Status)
  5756. [SaveIpxInfo]
  5757.     Debug-Output "SaveIpxInfo: entry RouterInstalled= "$($0)" AddIpxInfo = "$($1)
  5758.     set RouterInstalled = $($0)
  5759.     set AddIpxInfo      = $($1)
  5760.     set Status          = STATUS_FAILED
  5761.     Set KeyNull         = ""
  5762.     set RasIpxKeyName =  $(!NTN_SoftwareBase)"\Microsoft\Ras\Protocols\Ipx"
  5763.     set RasSvrParamKeyName = $(!NTN_ServiceBase)"\RemoteAccess\Parameters"
  5764.     OpenRegKey $(!REG_H_LOCAL) "" $(RasIpxKeyName) $(!MAXIMUM_ALLOWED) RasIpxKey
  5765.     ifstr $(RasIpxKey) != $(KeyNull)
  5766.         OpenRegKey $(!REG_H_LOCAL) "" $(RasSvrParamKeyName) +
  5767.                                             $(!MAXIMUM_ALLOWED) KeySrvParams
  5768.         ifstr $(KeySrvParams) == $(KeyNull)
  5769.            Debug-Output "SaveTcpipInfo: could not open RasSvr Params key"
  5770.            CloseRegKey $(RasIpxKey)
  5771.            return $(Status) $(fRouterInstalled)
  5772.         endif
  5773.         ifstr(i) $(AddIpxInfo) == TRUE
  5774.             CreateRegKey $(KeySrvParams) {"Ipx",$(NoTitle),GenericClass} "" $(!MAXIMUM_ALLOWED) "" RemoteIpxKey
  5775.             OpenRegKey $(KeySrvParams) "" "Ipx" $(!MAXIMUM_ALLOWED) RemoteIpxKey
  5776.             ifstr $(RemoteIpxKey) != $(KeyNull)
  5777.                EnumRegValue $(RasIpxKey) NewValueList
  5778.                Shell  "utility.inf", AddValueList, $(RemoteIpxKey), $(NewValueList)
  5779.                SetRegValue $(RemoteIpxKey) {RouterInstalled, 0,$(!REG_VT_DWORD), $(RouterInstalled)}
  5780.                CloseRegKey $(RemoteIpxKey)
  5781.             endif
  5782.         else
  5783.             Debug-Output "SaveIpxInfo: removing ipx info"
  5784.             DeleteRegTree $(KeySrvParams) "IPX"
  5785.         endif
  5786.         CloseRegKey $(KeySrvParams)
  5787.         CloseRegKey $(RasIpxKey)
  5788.     endif
  5789.     Debug-Output "SaveIpxInfo: exit"
  5790.     set Status = STATUS_SUCCESSFUL
  5791.     return $(Status)
  5792. [AddServiceDependency]
  5793.     Debug-Output "AddServiceDependency: entry"
  5794.     set Status   = STATUS_FAILED
  5795.     Set KeyNull  = ""
  5796.     set DependentService = $(!NTN_ServiceBase)\$($0)
  5797.     set DependentName = $($0)
  5798.     set DependOn = $($1)
  5799.     set ServiceKey = $(KeyNull)
  5800.     OpenRegKey $(!REG_H_LOCAL) "" $(DependentService)"\Linkage" $(!MAXIMUM_ALLOWED) ServiceKey
  5801.     ifstr(i) $(ServiceKey) != $(KeyNull)
  5802.         GetRegValue $(ServiceKey) "OtherDependencies" ServicesList
  5803.         ifint $(RegLastError) != 0
  5804.            set ServiceValues = {}
  5805.         else
  5806.            set ServiceValues = *($(ServicesList),4)
  5807.         endif
  5808.         debug-output "AddServiceDependency: Old OtherDependencies: "$(ServiceValues)
  5809.         ifstr(i) $(ServiceValues) == {}
  5810.             Set ServiceValues = {$(DependOn)}
  5811.         else-ifstr(i) $(ServiceValues) == ""
  5812.             Set ServiceValues = {$(DependOn)}
  5813.         else-ifcontains(i) $(DependOn) in $(ServiceValues)
  5814.             return STATUS_SUCCESSFUL
  5815.         else
  5816.             Set ServiceValues = >($(ServiceValues), $(DependOn))
  5817.         endif
  5818.         debug-output "AddServiceDependency: New OtherDependencies: "$(ServiceValues)
  5819.         SetRegValue $(ServiceKey) {OtherDependencies, 0,+
  5820.                                    $(!REG_VT_MULTI_SZ), $(ServiceValues)}
  5821.         CloseRegKey $(ServiceKey)
  5822.         set Status = STATUS_SUCCESSFUL
  5823.     else
  5824.         Debug-Output "AddServiceDependency: error opening service "$(DependentService)"\Linkage"
  5825.     endif
  5826.     set KeyService = $(KeyNull)
  5827.     OpenRegKey $(!REG_H_LOCAL) "" $(DependentService) $(!MAXIMUM_ALLOWED) KeyService
  5828.     ifstr $(KeyService) != $(KeyNull)
  5829.         set newDependList = {$(DependOn)}
  5830.         GetRegValue    $(KeyService) "DependOnService" ServiceList
  5831.         ifint $(RegLastError) == 0
  5832.             Debug-Output "AddServiceDependency: old DependOnService List "*($(ServiceList), 4)
  5833.             ForListDo *($(ServiceList),4)
  5834.                 ifstr(i) $($) != $(DependOn)
  5835.                    set newDependList = >($(newDependList), $($))
  5836.                 endif
  5837.             EndForListDo
  5838.         endif
  5839.         GetRegValue    $(KeyService) "DependOnGroup" GrpList
  5840.         ifint $(RegLastError) == 0
  5841.             Debug-Output "AddServiceDependency: old DependOnGroup List "*($(GrpList), 4)
  5842.             ForListDo *($(GrpList),4)
  5843.                set grp = "+"$($)
  5844.                set newDependList = >($(newDependList), $(grp))
  5845.             EndForListDo
  5846.         endif
  5847.         Debug-Output "OEMNSVRA.INF: AddServiceDependency: new Dependency List "$(newDependList)
  5848.         LibraryProcedure Result, $(!LIBHANDLE), SetupChangeServiceConfig, $(DependentName) $(!SERVICE_NO_CHANGE), $(!SERVICE_NO_CHANGE), $(!SERVICE_NO_CHANGE), "", "", $(newDependList), "", "", ""
  5849.         CloseRegKey $(KeyService)
  5850.     else
  5851.         Debug-Output "AddServiceDependency: failed to open service linkage key"$(DependentService)
  5852.     endif
  5853.     Debug-Output "AddServiceDependency: exit"
  5854.     return $(Status)
  5855. [RemoveServiceDependency]
  5856.     Debug-Output "RemoveServiceDependency: entry"
  5857.     set Status   = STATUS_FAILED
  5858.     Set KeyNull  = ""
  5859.     set DependentService = $(!NTN_ServiceBase)\$($0)
  5860.     set DependentName = $($0)
  5861.     set DependOn = $($1)
  5862.     OpenRegKey $(!REG_H_LOCAL) "" $(DependentService)"\Linkage" $(!MAXIMUM_ALLOWED) ServiceKey
  5863.     ifstr(i) $(ServiceKey) != $(KeyNull)
  5864.         GetRegValue $(ServiceKey) "OtherDependencies" ServicesList
  5865.         ifint $(RegLastError) != 0
  5866.            set ServiceValues = {}
  5867.         else
  5868.            set ServiceValues = *($(ServicesList),4)
  5869.         endif
  5870.         debug-output "RemoveServiceDependency: old OtherDependencies list:"$(ServicesList)
  5871.         set ServiceValues = *($(ServicesList),4)
  5872.         debug-output "ServiceValues: "$(ServiceValues)
  5873.         ifcontains(i) $(DependOn) in $(ServiceValues)
  5874.             set NewServiceValues = {}
  5875.             ForListDo $(ServiceValues)
  5876.                 ifstr(i) $($) != $(DependOn)
  5877.                     set NewServiceValues = >($(NewServiceValues), $($))
  5878.                 endif
  5879.             EndForListDo
  5880.             debug-output "RemoveServiceDependency: new OtherDependencies list: "$(NewServiceValues)
  5881.             SetRegValue $(ServiceKey) {OtherDependencies, 0,+
  5882.                              $(!REG_VT_MULTI_SZ), $(NewServiceValues)}
  5883.         else
  5884.         endif
  5885.         CloseRegKey $(ServiceKey)
  5886.         set Status = STATUS_SUCCESSFUL
  5887.     else
  5888.         Debug-Output "RemoveServiceDependency: error opening service "$(DependentService)"\Linkage"
  5889.     endif
  5890.     set KeyService = $(KeyNull)
  5891.     OpenRegKey $(!REG_H_LOCAL) "" $(DependentService) $(!MAXIMUM_ALLOWED) KeyService
  5892.     ifstr $(KeyService) != $(KeyNull)
  5893.         set newDependList = {}
  5894.         GetRegValue    $(KeyService) "DeleteFlag" DeleteFlagValue
  5895.         ifint $(RegLastError) != 0
  5896.             GetRegValue    $(KeyService) "DependOnService" ServiceList
  5897.             ifint $(RegLastError) == 0
  5898.                 Debug-Output "RemoveServiceDependency: old DependOnService List "*($(ServiceList), 4)
  5899.                 ifcontains(i) $(DependOn) in *($(ServiceList),4)
  5900.                     ForListDo *($(ServiceList),4)
  5901.                         ifstr(i) $($) != $(DependOn)
  5902.                            set newDependList = >($(newDependList), $($))
  5903.                         endif
  5904.                     EndForListDo
  5905.                     GetRegValue $(KeyService) "DependOnGroup" GrpList
  5906.                     ifint $(RegLastError) == 0
  5907.                         ForListDo *($(GrpList),4)
  5908.                            set grp = "+"$($)
  5909.                            set newDependList = >($(newDependList), $(grp))
  5910.                         EndForListDo
  5911.                     endif
  5912.                     Debug-Output "OEMNSVRA.INF:RemoveServiceDependency: new DependOnService List "$(newDependList)
  5913.                     LibraryProcedure Result, $(!LIBHANDLE), +
  5914.                        SetupChangeServiceConfig, $(DependentName)  +
  5915.                        $(!SERVICE_NO_CHANGE), $(!SERVICE_NO_CHANGE), +
  5916.                        $(!SERVICE_NO_CHANGE), "", "",  +
  5917.                        $(newDependList), "", "", ""
  5918.                 endif
  5919.             endif
  5920.         endif
  5921.         CloseRegKey $(KeyService)
  5922.     else
  5923.         Debug-Output "RemoveServiceDependency: failed to open service linkage key"$(DependentService)
  5924.     endif
  5925.     Debug-Output "RemoveServiceDependency: exit"
  5926.     return $(Status)
  5927. [QueryUserQuit]
  5928.     set Status     = STATUS_FAILED
  5929.     set UserAction = CANCEL
  5930.     set STF_MB_TEXT  = "The changes will not be saved. "+
  5931.                        "Are you sure you want to exit Setup."
  5932.     read-syms ExitWarningDlg$(!STF_LANGUAGE)
  5933.     ui start "ExitWarning"
  5934.     ifstr(i) $(DLGEVENT) == "YES"
  5935.         set Status     = STATUS_SUCCESSFUL
  5936.         set UserAction = "OK"
  5937.     else-ifstr(i) $(DLGEVENT) == "NO"
  5938.         set Status     = STATUS_SUCCESSFUL
  5939.         set UserAction = "CANCEL"
  5940.     else
  5941.     endif
  5942. fin_QueryUserQuit = +
  5943.     Return $(Status) $(UserAction)
  5944. [QueryRasUpgrade]
  5945.     set Status     = STATUS_FAILED
  5946.     set UserAction = CANCEL
  5947.     read-syms RasUpgrade$(!STF_LANGUAGE)
  5948.     set Text = $($0)$(Ver)$($1)$(Text1)$(Ver)$($2)$(Text2)$(Text3)
  5949.     set STF_MB_TEXT  = $(Text)
  5950.     read-syms ExitWarningDlg$(!STF_LANGUAGE)
  5951.     ui start "RasUpgrade"
  5952.     ifstr(i) $(DLGEVENT) == "YES"
  5953.         set Status     = STATUS_SUCCESSFUL
  5954.         set UserAction = "OK"
  5955.     else-ifstr(i) $(DLGEVENT) == "NO"
  5956.         set Status     = STATUS_SUCCESSFUL
  5957.         set UserAction = "CANCEL"
  5958.     else
  5959.     endif
  5960. fin_QueryRasUpgrade = +
  5961.     Return $(Status) $(UserAction)
  5962. [CP-List]
  5963. NBFCP       = "%SystemRoot%\SYSTEM32\RASNBFCP.DLL"
  5964. IPCP        = "%SystemRoot%\SYSTEM32\RASIPCP.DLL"
  5965. IPXCP       = "%SystemRoot%\SYSTEM32\RASIPXCP.DLL"
  5966. PAP         = "%SystemRoot%\SYSTEM32\RASPAP.DLL"
  5967. CHAP        = "%SystemRoot%\SYSTEM32\RASCHAP.DLL"
  5968. SPAP        = "%SystemRoot%\SYSTEM32\RASSPAP.DLL"
  5969. CBCP        = "%SystemRoot%\SYSTEM32\RASCBCP.DLL"
  5970. COMPCP      = "%SystemRoot%\SYSTEM32\RASCCP.DLL"
  5971. [Files-RemoveList]
  5972. RASADMINDLL    = $(!STF_WINDOWSSYSPATH)\RASADMIN.DLL
  5973. RASGTWYDLL     = $(!STF_WINDOWSSYSPATH)\RASGTWY.DLL
  5974. RASGPRXYDLL    = $(!STF_WINDOWSSYSPATH)\RASGPRXY.DLL
  5975. RASSRVEXE      = $(!STF_WINDOWSSYSPATH)\RASSRV.EXE
  5976. RASCTRSDLL     = $(!STF_WINDOWSSYSPATH)\RASCTRS.DLL
  5977. RASCTRSINI     = $(!STF_WINDOWSSYSPATH)\RASCTRS.INI
  5978. RASCTRNMH      = $(!STF_WINDOWSSYSPATH)\RASCTRNM.H
  5979. RASSPRXYEXE    = $(!STF_WINDOWSSYSPATH)\RASSPRXY.EXE
  5980. RASSAUTHDLL    = $(!STF_WINDOWSSYSPATH)\RASSAUTH.DLL
  5981. RASDIALEXE     = $(!STF_WINDOWSSYSPATH)\RASDIAL.EXE
  5982. RASPHONEHLP    = $(!STF_WINDOWSSYSPATH)\RASPHONE.HLP
  5983. RASGLOSSHLP    = $(!STF_WINDOWSSYSPATH)\RASGLOSS.HLP
  5984. RASAPI32DLL    = $(!STF_WINDOWSSYSPATH)\RASAPI32.DLL
  5985. RASCAUTHDLL    = $(!STF_WINDOWSSYSPATH)\RASCAUTH.DLL
  5986. RASADMINHLP    = $(!STF_WINDOWSSYSPATH)\RASADMIN.HLP
  5987. RASMANDLL      = $(!STF_WINDOWSSYSPATH)\RASMAN.DLL
  5988. RASMANEXE      = $(!STF_WINDOWSSYSPATH)\RASMAN.EXE
  5989. RASMSGDLL      = $(!STF_WINDOWSSYSPATH)\RASMSG.DLL
  5990. RASMXSDLL      = $(!STF_WINDOWSSYSPATH)\RASMXS.DLL
  5991. RASSERDLL      = $(!STF_WINDOWSSYSPATH)\RASSER.DLL
  5992. RASIPXCPDLL    = $(!STF_WINDOWSSYSPATH)\RASIPXCP.DLL
  5993. RASPPPDLL      = $(!STF_WINDOWSSYSPATH)\RASPPP.DLL
  5994. RASPPPENDLL    = $(!STF_WINDOWSSYSPATH)\RASPPPEN.DLL
  5995. RASPAPDLL      = $(!STF_WINDOWSSYSPATH)\RASPAP.DLL
  5996. RASCHAPDLL     = $(!STF_WINDOWSSYSPATH)\RASCHAP.DLL
  5997. RASSPAPDLL     = $(!STF_WINDOWSSYSPATH)\RASSPAP.DLL
  5998. RASIPCPDLL     = $(!STF_WINDOWSSYSPATH)\RASIPCP.DLL
  5999. RASIPHLPDLL    = $(!STF_WINDOWSSYSPATH)\RASIPHLP.DLL
  6000. RASNBFCPDLL    = $(!STF_WINDOWSSYSPATH)\RASNBFCP.DLL
  6001. RASNBIPCDLL    = $(!STF_WINDOWSSYSPATH)\RASNBIPC.DLL
  6002. RASCCPDLL      = $(!STF_WINDOWSSYSPATH)\RASCCP.DLL
  6003. RASCBCPDLL     = $(!STF_WINDOWSSYSPATH)\RASCBCP.DLL
  6004. ASYNCMACSYS    = $(!STF_WINDOWSSYSPATH)\DRIVERS\ASYNCMAC.SYS
  6005. NDISWANSYS     = $(!STF_WINDOWSSYSPATH)\DRIVERS\NDISWAN.SYS
  6006. RASARPSYS      = $(!STF_WINDOWSSYSPATH)\DRIVERS\RASARP.SYS
  6007. [Source Media Descriptions]
  6008.     1 = "Windows NT Server CD-ROM", TAGFILE = cdrom_s.40
  6009. [Signature]
  6010.     FileType = MICROSOFT_FILE
  6011. [GetSignature]
  6012.     read-syms Signature
  6013.     return $(FileType)
  6014. [ProductType]
  6015. STF_PRODUCT  = LanmanNT
  6016. STF_PLATFORM = I386
  6017. [Files-Ras-Admin]
  6018. 1,RASADMIN.EXE , SIZE=999 , NODELETESOURCE
  6019. 1,RASSAPI.DLL , SIZE=999 , NODELETESOURCE
  6020. 1,RASADMIN.CNT , SIZE=1330
  6021. 1,RASADMIN.HLP , SIZE=41904
  6022. [Files-Ras-Client]
  6023. 1,RASPHONE.EXE , SIZE=999 , NODELETESOURCE
  6024. 1,RASSHELL.DLL , SIZE=999 , NODELETESOURCE
  6025. 1,RASAPI16.DLL , SIZE=999
  6026. 1,RASAPI32.DLL , SIZE=999
  6027. 1,RASCAUTH.DLL , SIZE=999
  6028. 1,RASCPL.CPL , SIZE=999
  6029. 1,RASDIAL.EXE , SIZE=999
  6030. 1,RASGLOSS.CNT , SIZE=2310
  6031. 1,RASGLOSS.HLP , SIZE=23767
  6032. 1,RASMON.EXE , SIZE=999
  6033. 1,RASPHONE.CNT , SIZE=7381
  6034. 1,RASPHONE.HLP , SIZE=289168
  6035. 1,RASSCRPT.DLL , SIZE=999
  6036. [Files-Ras-Common]
  6037. 1,RASADHLP.DLL , SIZE=999
  6038. 1,RASAUTO.DLL , SIZE=999
  6039. 1,RASAUTOU.EXE , SIZE=999
  6040. 1,RASCBCP.DLL , SIZE=999
  6041. 1,RASCCP.DLL , SIZE=999
  6042. 1,RASCHAP.DLL , SIZE=999
  6043. 1,RASDLG.DLL , SIZE=999
  6044. 1,RASIPCP.DLL , SIZE=999
  6045. 1,RASIPHLP.DLL , SIZE=999
  6046. 1,RASIPXCP.DLL , SIZE=999
  6047. 1,RASMAN.DLL , SIZE=999
  6048. 1,RASMAN.EXE , SIZE=999
  6049. 1,RASMSG.DLL , SIZE=999
  6050. 1,RASMXS.DLL , SIZE=999
  6051. 1,RASNBFCP.DLL , SIZE=999
  6052. 1,RASNBIPC.DLL , SIZE=999
  6053. 1,RASPAP.DLL , SIZE=999
  6054. 1,RASPPPEN.DLL , SIZE=999
  6055. 1,RASSER.DLL , SIZE=999
  6056. 1,RASSPAP.DLL , SIZE=999
  6057. 1,RASTAPI.DLL , SIZE=999
  6058. [Files-Ras-Drivers]
  6059. 1,ASYNCMAC.SYS , SIZE=999
  6060. 1,NDISTAPI.SYS , SIZE=999
  6061. 1,NDISWAN.SYS , SIZE=999
  6062. 1,RASACD.SYS , SIZE=999
  6063. 1,RASARP.SYS , SIZE=999
  6064. [Files-Ras-Inf]
  6065. modem = 1,MODEM.INF , SIZE=999 , NODELETESOURCE
  6066. pad = 1,PAD.INF , SIZE=999 , NODELETESOURCE
  6067. rasico = 1,RAS.ICO , SIZE=999 , NODELETESOURCE
  6068. rasread = 1,RASREAD.TXT , SIZE=999 , NODELETESOURCE
  6069. switch = 1,SWITCH.INF , SIZE=999 , NODELETESOURCE
  6070. [Files-Ras-Scp]
  6071. cis = 1,CIS.SCP , SIZE=999 , NODELETESOURCE
  6072. pppmenu = 1,PPPMENU.SCP , SIZE=999 , NODELETESOURCE
  6073. scriptdoc = 1,SCRIPT.DOC , SIZE=999 , NODELETESOURCE
  6074. slip = 1,SLIP.SCP , SIZE=999 , NODELETESOURCE
  6075. slipmenu = 1,SLIPMENU.SCP , SIZE=999 , NODELETESOURCE
  6076. [Files-Ras-Server]
  6077. 1,RASADMIN.DLL , SIZE=999
  6078. 1,RASCTRS.DLL , SIZE=999
  6079. 1,RASGPRXY.DLL , SIZE=999
  6080. 1,RASGTWY.DLL , SIZE=999
  6081. 1,RASSAUTH.DLL , SIZE=999
  6082. 1,RASSPRXY.EXE , SIZE=999
  6083. 1,RASSRV.EXE , SIZE=999
  6084. [Files-Resource]
  6085. 1,RASCFG.DLL , SIZE=999 , NODELETESOURCE
  6086. 1,RASFIL32.DLL , SIZE=999 , NODELETESOURCE
  6087. 1,RASSETUP.CNT , SIZE=99 , NODELETESOURCE
  6088. 1,RASSETUP.HLP , SIZE=16757 , NODELETESOURCE
  6089. [LanguagesSupported]
  6090.     ENG
  6091. [OptionsTextENG]
  6092.     RAS = "Remote Access Service"
  6093. [FileConstantsENG]
  6094.     RasGroup    = "Remote Access Service"
  6095.     RasPhone    = "Remote Access"
  6096.     RasMon      = "Remote Access Monitor"
  6097.     RasAdmin    = "Remote Access Admin"
  6098.     ReadMe      = "Read Me"
  6099.     RasInternet = "Remote Access and the Internet"
  6100.     RasHelp     = "Remote Access Help"
  6101.     ProCaption   = "Remote Access Service Setup"
  6102.     ProCancel    = "Cance&l"
  6103.     ProCancelMsg = "Remote Access Service is not correctly installed. "+
  6104.                    "Are you sure you want to cancel copying files?"
  6105.     ProCancelCap = "Remote Access Service Setup Message"
  6106.     ProText1     = "Copying:"
  6107.     ProText2     = "To:"
  6108.     Error        = "Unable to determine proper source disk location; copy cannot be performed."
  6109.     FunctionTitle   ="Remote Access Setup"
  6110.     ProductRASDescription                = "Enables users to work offsite as though connected directly to a network."
  6111.     ProductRASTitle                      = "Remote Access Service"
  6112.     ProductRASDisplayName                = "Remote Access Service"
  6113.     ProductRASMANDescription             = "Windows NT Remote Access Connection Manager"
  6114.     ProductRASMANTitle                   = "Remote Access Connection Manager"
  6115.     ProductRASMANDisplayName             = "Remote Access Connection Manager"
  6116.     !ProductRASAUTODIALDescription       = "Windows NT Remote Access Autodial Manager"
  6117.     !ProductRASAUTODIALDisplayName       = "Remote Access Autodial Manager"
  6118.     !ProductRASAUTODIALTitle             = "Remote Access Autodial Manager"
  6119.     !ProductNDISWANDescription           = "Windows NT Remote Access WAN Wrapper"
  6120.     !ProductNDISWANTitle                 = "Remote Access WAN Wrapper"
  6121.     !ProductNDISWANDisplayName           = "Remote Access WAN Wrapper"
  6122.     ProductRASASYMACDescription          = "Windows NT Remote Access AsyMac Adapter Driver"
  6123.     ProductRASASYMACTitle                = "Remote Access Mac"
  6124.     ProductRASASYMACDisplayName          = "Remote Access Mac"
  6125.     ProductRASSVRDescription             = "Windows NT Remote Access NetBios Gateway"
  6126.     ProductRASSVRTitle                   = "Remote Access Server Service"
  6127.     ProductRASSVRDisplayName             = "Remote Access Server"
  6128.     !ProductRASISNRIPTitle               = "Remote Access NWLNKRIP Service"
  6129.     !ProductRASISNRIPDisplayName         = "Remote Access NWLNKRIP Service"
  6130.     !ProductRASISNSAPTitle               = "Remote Access NWLNKSAP Service"
  6131.     !ProductRASISNSAPDisplayName         = "Remote Access NWLNKSAP Service"
  6132.     !ProductRASARPTitle                  = "Remote Access ARP Service"
  6133.     !ProductRASARPDisplayName            = "Remote Access ARP Service"
  6134.     !ProductRASACDDisplayName            = "Remote Access Auto Connection Driver"
  6135.     !ProductNDISTAPIDisplayName          = "Microsoft NDIS TAPI driver"
  6136. [DialogConstantsENG]
  6137.     Help        = "&Help"
  6138.     Exit        = "E&xit"
  6139.     OK          = "OK"
  6140.     HelpContext = ""
  6141.     Continue    = "C&ontinue"
  6142.     Cancel      = "C&ancel"
  6143. [ExitWarningDlgENG]
  6144.     DlgType      = "MessageBox"
  6145.     STF_MB_TITLE = "Remote Access Service Setup"
  6146.     STF_MB_TYPE  = 3
  6147.     STF_MB_ICON  = 5
  6148.     STF_MB_DEF   = 2
  6149. [SetupAbortDlgENG]
  6150.     DlgType     = "Info"
  6151.     DlgTemplate = "RESTART"
  6152.     Caption     = "Remote Access Service Setup"
  6153.     DlgText     = "Setup for Remote Access Service failed."$(!LF)$(!LF)+
  6154.                   "Please choose Exit to exit back to the Windows NT System."
  6155.     Windows     = "E&xit to &Windows NT"
  6156. [AbortMessageENG]
  6157.   AbortText  =  "Aborting Remote Access Setup. Please restart the system "+
  6158.                 "to fix the problem."
  6159. [ShellCodeErrorMsgENG]
  6160.     DlgType      = "MessageBox"
  6161.     STF_MB_TITLE = "Error: "$(FunctionTitle)
  6162.     STF_MB_TEXT  = "An error occured running the shell command. "+
  6163.                    "Please restart the system to fix the problem."
  6164.     STF_MB_TYPE  = 1
  6165.     STF_MB_ICON  = 3
  6166.     STF_MB_DEF   = 1
  6167. [SuccessfulInstallENG]
  6168.   Success  = "Remote Access Service has been successfully installed. "$(!LF)$(!LF)+
  6169.              "Use Remote Access Admin or User Manager in the Administrative "+
  6170.              "Tools Folder to assign Remote Access permissions to users."
  6171. [MsgDlgENG]
  6172.     DlgType      = "MessageBox"
  6173.     STF_MB_TYPE  = 1
  6174.     STF_MB_ICON  = 2
  6175.     STF_MB_DEF   = 2
  6176. [StatusUpdatingRegistryENG]
  6177.     CreatingRas             = "Please wait while Remote Access is installed..."
  6178.     WritingRasParams        = "Writing Remote Access parameters..."
  6179.     WritingRasParamsAdd     = "Writing Remote Access parameters...Adding RAS binding "
  6180.     WritingRasParamsRemove  = "Writing Remote Access parameters...Removing RAS binding "
  6181.     RemovingRas             = "Removing Remote Access Service..."
  6182.     RemovingAdapters        = "Remote Access Setup: Removing RAS binding "
  6183.     RemovingResources       = "Removing Remote Access resource files..."
  6184.     UpdatingRas             = "Please wait while Remote Access is updated..."
  6185. [StatusDeterminingConfigENG]
  6186.     ReadingConfig      = "Determining current configuration ..."
  6187. [StatusCopyingResENG]
  6188.     Status = "Copying DLLs and INF files to disk ..."
  6189. [NonFatalError1ENG]
  6190.     NonFatal  = "Setup cannot function properly without a user name."
  6191. [FatalErrorMemENG]
  6192.     Fatal  = "Not enough memory is available. Remote Access requires atleast 2 Meg."
  6193. [NoConfigAdminENG]
  6194.     NoConfigAdmin = "The only component installed currently is RasAdmin which "+
  6195.                     "cannot be configured."
  6196. [VerExistsENG]
  6197.     Ver   = " version "
  6198.     Text1 = " is already installed. "
  6199. [NetworkConfigErrorENG]
  6200.     Text1 = "Setup encountered an error while determining the "+
  6201.             "network configuration.  Please make sure that "+
  6202.             "the network is properly configured before attempting "+
  6203.             "to install Remote Access Service."
  6204.     Text2 = "The Microsoft Windows Workstation and Server Service must be "+
  6205.             "installed for proper operation of Remote Access Service."$(!LF)$(!LF)+
  6206.             "To install Workstation or Server Service:"$(!LF)$(!LF)+
  6207.             "1. Invoke 'Network' control panel applet."$(!LF)+
  6208.             "2. Choose Add Software and select Workstation or Server from the list."
  6209. [NoPortsConfiguredENG]
  6210.    NoPortsError =+
  6211.        "Remote Access is not configured with any ports. "+
  6212.        "You have an invalid RAS configuration. "+
  6213.        "Please configure Remote Access Service and add "+
  6214.        "ports using the Network option in Control Panel "+
  6215.        "after restarting the system."
  6216. [QueryInstalledProtocolsErrorENG]
  6217.     Text  = "Setup encountered an error while determining the "+
  6218.             "installed network protocols.  Try restarting the "+
  6219.             "system to correct the problem. Contact your system "+
  6220.             "administrator, if the problem persists."
  6221. [RasUpgradeENG]
  6222.     Ver = " ver "
  6223.     Text1 = " exists on the system. Are you sure you want to upgrade to"
  6224.     Text2 = "?. "
  6225.     Text3 = "Selecting YES will result in the new version replacing the old."
  6226. [InstallLoopbackENG]
  6227. Message = "RAS Setup has discovered that you have configured one or more "+
  6228.           "ports to receive calls and your computer does not have a "+
  6229.           "network adapter installed. Setup will install the MS Loopback "+
  6230.           "Adapter to enable remote clients to use resources on this computer."
  6231. Error   = "RAS setup encountered an error while invoking the OEMNADLB.INF file "+
  6232.           "to install the MS Loopback Adapter. You can install the Loopback Adapter "+
  6233.           "from the Network option in Control Panel after restarting the system. "+
  6234.           "Remote Clients will not be able to dialin and use resources on this computer "+
  6235.           "till you install the Loopback Adapter."
  6236. [NoNetbeuiDlgENG]
  6237.     NoNetbeuiWarning =+
  6238.         "The NetBEUI protocol is either not installed or not configured "+
  6239.         "for Remote Access.  NetBEUI provides the fastest throughput to "+
  6240.         "NetBIOS resources when accessed over a Remote Access connection. "+
  6241.         "If clients will access remote NetBIOS resources, configure RAS "+
  6242.         "to use NetBEUI. "$(!LF)$(!LF)+
  6243.         "You can add the NetBEUI protocol to your computer using the "+
  6244.         "Network option in Control Panel."
  6245. [NoProtocolsDlgENG]
  6246.     NoProtocolsWarning =+
  6247.        "Remote Access is not configured with any network protocols. "+
  6248.        "You have an invalid RAS configuration. "+
  6249.        "You can configure RAS to support "+
  6250.        "network protocols using the Network option in Control Panel "+
  6251.        "after restarting the system."
  6252. [UpgradeErrorsENG]
  6253. UpgradeIsdnInfoError = "Remote Access Setup encoutered an error while "+
  6254.                        "updating the ISDN information. Please remove and "+
  6255.                        "reinstall Remote Access to ensure proper operation."
  6256. [RasErrorsENG]
  6257. ErrorBadArgs = "OEMNSVRA.INF specified invalid number of arguments "+
  6258.                "to RASCFG.DLL. Remote Access Setup will terminate now."
  6259. ErrorNoPorts = "Dial-Up Networking setup failed to detect any installed "+
  6260.                "ports on this computer. Setup will terminate now."
  6261. ErrorUnknown = "Dial-Up Networking setup encountered an unknown failure "+
  6262.                "and will terminate now. Please contact your administrator "+
  6263.                "to deteremine the cause of the problem."
  6264. InvalidMode  = "Dial-Up Networking setup was invoked with an invalid "+
  6265.                "RasInstallMode environment variable. It should be set to "+
  6266.                "either install or configure. The value currently passed to "+
  6267.                "setup is "$(RasInstallMode)"."
  6268. UnableToLoadSetupdll = "Dial-Up Networking setup was unable to load setupdll.dll "+
  6269.                        "in the system32 directory. Please make sure this file is "+
  6270.                        "present on your computer. Setup will now exit. "
  6271. UnableToLoadNcpaCpl = "Dial-Up Networking setup was unable to load ncpa.cpl "+
  6272.                        "in the system32 directory. Please make sure this file is "+
  6273.                        "present on your computer. Setup will now exit. "
  6274. NoProductType = "Dial-Up Networking setup was unable to determine your "+
  6275.                 "computer product type. Make sure that the following registry "+
  6276.                 "value exists on your computer. "+
  6277.                 "HEKY_LOCAL_MACHINE\System\CurrentControlSet\Control\ProductOptions. "+
  6278.                 "Setup will now exit."
  6279. UnknownProductType = "Dial-Up Networking setup detected an unsupported product type "$(TempProductType)". "+
  6280.                      "Make sure that the following registry value HEKY_LOCAL_MACHINE\System\CurrentControlSet\Control\ProductOptions\ProductType "+
  6281.                      "is one of the following valid values WinNT, LanManNT or ServerNT. Setup will now exit."
  6282. [Billboard1ENG]
  6283. Status = "Remote Access Setup is installing the NetBEUI transport..."
  6284. [Billboard2ENG]
  6285. Status = "Remote Access Setup is installing the TCP/IP transport..."
  6286. [Billboard3ENG]
  6287. Status = "Remote Access Setup is installing NWLINK and related services..."
  6288.